Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RCefWebDisplayHandle.hxx
Go to the documentation of this file.
1// Author: Sergey Linev <S.Linev@gsi.de>
2// Date: 2020-08-21
3// Warning: This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
4
5/*************************************************************************
6 * Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
13#ifndef ROOT7_RCefWebDisplayHandle
14#define ROOT7_RCefWebDisplayHandle
15
17
18#include "simple_app.h"
19
20/** \class RCefWebDisplayHandle
21\ingroup cefwebdisplay
22*/
23
25protected:
26 class CefCreator : public Creator {
27
28 CefRefPtr<SimpleApp> fCefApp;
29 public:
30 CefCreator() = default;
31 virtual ~CefCreator() = default;
32
33 std::unique_ptr<ROOT::Experimental::RWebDisplayHandle> Display(const ROOT::Experimental::RWebDisplayArgs &args) override;
34 };
35
36 enum EValidValues { kValid = 0x3C3C3C3C, kInvalid = 0x92929292 };
37
38 unsigned fValid{kValid}; ///< used to verify if instance valid or not
39
40 CefRefPtr<CefBrowser> fBrowser; ///< associated browser
41
42public:
43 RCefWebDisplayHandle(const std::string &url) : ROOT::Experimental::RWebDisplayHandle(url) {}
44
45 virtual ~RCefWebDisplayHandle();
46
47 bool IsValid() const { return fValid == kValid; }
48
49 void SetBrowser(CefRefPtr<CefBrowser> br) { if (IsValid()) fBrowser = br; }
50
51 void CloseBrowser();
52
53 bool WaitForContent(int tmout_sec, const std::string &extra_args);
54
55 static void AddCreator();
56
57};
58
59
60#endif
std::unique_ptr< ROOT::Experimental::RWebDisplayHandle > Display(const ROOT::Experimental::RWebDisplayArgs &args) override
CefRefPtr< CefBrowser > fBrowser
associated browser
void CloseBrowser()
Closes associated browser window.
void SetBrowser(CefRefPtr< CefBrowser > br)
bool WaitForContent(int tmout_sec, const std::string &extra_args)
Process system events until browser content is available Used in headless mode for batch production l...
unsigned fValid
used to verify if instance valid or not
virtual ~RCefWebDisplayHandle()
Destructor Closes browser window if any.
RCefWebDisplayHandle(const std::string &url)
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
Handle of created web-based display Depending from type of web display, holds handle of started brows...
RWebDisplayHandle(const std::string &url)
constructor
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...