Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
GuiHandler Class Reference

Definition at line 45 of file gui_handler.h.

Public Member Functions

 GuiHandler (bool use_views=false)
 
std::string AddBatchPage (const std::string &cont)
 Generate URL for batch page Uses file:/// prefix to let access JSROOT scripts placed on file system Register provider for that page in resource manager.
 
void CloseAllBrowsers (bool force_close)
 
virtual bool DoClose (CefRefPtr< CefBrowser > browser) override
 
virtual CefRefPtr< CefDisplayHandlerGetDisplayHandler () override
 
virtual CefRefPtr< CefLifeSpanHandlerGetLifeSpanHandler () override
 
virtual CefRefPtr< CefLoadHandlerGetLoadHandler () override
 
virtual CefRefPtr< CefRequestHandlerGetRequestHandler () override
 
virtual CefRefPtr< CefResourceHandlerGetResourceHandler (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefRefPtr< CefRequest > request) override
 
virtual CefRefPtr< CefResourceRequestHandlerGetResourceRequestHandler (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefRefPtr< CefRequest > request, bool is_navigation, bool is_download, const CefString &request_initiator, bool &disable_default_handling) override
 
bool IsClosing () const
 
std::string MakePageUrl (THttpServer *serv, const std::string &addr)
 Generate URL for RWebWindow page Register server instance and assign it with the index Produced URL only works inside CEF and does not represent real HTTP address.
 
virtual void OnAfterCreated (CefRefPtr< CefBrowser > browser) override
 
virtual void OnBeforeClose (CefRefPtr< CefBrowser > browser) override
 
virtual cef_return_value_t OnBeforeResourceLoad (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefRefPtr< CefRequest > request, CefRefPtr< CefResourceLoadCallBack > callback) override
 
virtual bool OnConsoleMessage (CefRefPtr< CefBrowser > browser, cef_log_severity_t level, const CefString &message, const CefString &source, int line) override
 
virtual void OnLoadError (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, ErrorCode errorCode, const CefString &errorText, const CefString &failedUrl) override
 
virtual void OnTitleChange (CefRefPtr< CefBrowser > browser, const CefString &title) override
 

Static Public Member Functions

static std::string GetDataURI (const std::string &data, const std::string &mime_type)
 
static bool PlatformInit ()
 

Protected Types

typedef std::list< CefRefPtr< CefBrowser > > BrowserList
 ! List of existing browser windows. Only accessed on the CEF UI thread.
 

Protected Attributes

BrowserList fBrowserList
 
int fConsole {0}
 ! console parameter, assigned via WebGui.Console rootrc parameter
 
std::vector< THttpServer * > fServers
 
bool fUseViews {false}
 ! if view framework is used, required for true headless mode
 
bool is_closing_
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (GuiHandler)
 
 IMPLEMENT_REFCOUNTING (GuiHandler)
 
void PlatformTitleChange (CefRefPtr< CefBrowser > browser, const CefString &title)
 

Private Attributes

int fBatchPageCount {0}
 
CefRefPtr< CefResourceManager > fResourceManager
 

#include <gui_handler.h>

Inheritance diagram for GuiHandler:
[legend]

Member Typedef Documentation

◆ BrowserList

typedef std::list<CefRefPtr<CefBrowser> > GuiHandler::BrowserList
protected

! List of existing browser windows. Only accessed on the CEF UI thread.

Definition at line 55 of file gui_handler.h.

Constructor & Destructor Documentation

◆ GuiHandler()

GuiHandler::GuiHandler ( bool  use_views = false)
explicit

Definition at line 51 of file gui_handler.cxx.

Member Function Documentation

◆ AddBatchPage()

std::string GuiHandler::AddBatchPage ( const std::string &  cont)

Generate URL for batch page Uses file:/// prefix to let access JSROOT scripts placed on file system Register provider for that page in resource manager.

Definition at line 439 of file gui_handler.cxx.

◆ CloseAllBrowsers()

void GuiHandler::CloseAllBrowsers ( bool  force_close)

Definition at line 152 of file gui_handler.cxx.

◆ DISALLOW_COPY_AND_ASSIGN()

GuiHandler::DISALLOW_COPY_AND_ASSIGN ( GuiHandler  )
private

◆ DoClose()

bool GuiHandler::DoClose ( CefRefPtr< CefBrowser >  browser)
overridevirtual

Definition at line 85 of file gui_handler.cxx.

◆ GetDataURI()

std::string GuiHandler::GetDataURI ( const std::string &  data,
const std::string &  mime_type 
)
static

Definition at line 124 of file gui_handler.cxx.

◆ GetDisplayHandler()

virtual CefRefPtr< CefDisplayHandler > GuiHandler::GetDisplayHandler ( )
inlineoverridevirtual

Definition at line 71 of file gui_handler.h.

◆ GetLifeSpanHandler()

virtual CefRefPtr< CefLifeSpanHandler > GuiHandler::GetLifeSpanHandler ( )
inlineoverridevirtual

Definition at line 69 of file gui_handler.h.

◆ GetLoadHandler()

virtual CefRefPtr< CefLoadHandler > GuiHandler::GetLoadHandler ( )
inlineoverridevirtual

Definition at line 70 of file gui_handler.h.

◆ GetRequestHandler()

virtual CefRefPtr< CefRequestHandler > GuiHandler::GetRequestHandler ( )
inlineoverridevirtual

Definition at line 72 of file gui_handler.h.

◆ GetResourceHandler()

CefRefPtr< CefResourceHandler > GuiHandler::GetResourceHandler ( CefRefPtr< CefBrowser >  browser,
CefRefPtr< CefFrame >  frame,
CefRefPtr< CefRequest >  request 
)
overridevirtual

Definition at line 340 of file gui_handler.cxx.

◆ GetResourceRequestHandler()

virtual CefRefPtr< CefResourceRequestHandler > GuiHandler::GetResourceRequestHandler ( CefRefPtr< CefBrowser >  browser,
CefRefPtr< CefFrame >  frame,
CefRefPtr< CefRequest >  request,
bool  is_navigation,
bool  is_download,
const CefString &  request_initiator,
bool disable_default_handling 
)
inlineoverridevirtual

Definition at line 97 of file gui_handler.h.

◆ IMPLEMENT_REFCOUNTING()

GuiHandler::IMPLEMENT_REFCOUNTING ( GuiHandler  )
private

◆ IsClosing()

bool GuiHandler::IsClosing ( ) const
inline

Definition at line 94 of file gui_handler.h.

◆ MakePageUrl()

std::string GuiHandler::MakePageUrl ( THttpServer serv,
const std::string &  addr 
)

Generate URL for RWebWindow page Register server instance and assign it with the index Produced URL only works inside CEF and does not represent real HTTP address.

Definition at line 454 of file gui_handler.cxx.

◆ OnAfterCreated()

void GuiHandler::OnAfterCreated ( CefRefPtr< CefBrowser >  browser)
overridevirtual

Definition at line 77 of file gui_handler.cxx.

◆ OnBeforeClose()

void GuiHandler::OnBeforeClose ( CefRefPtr< CefBrowser >  browser)
overridevirtual

Definition at line 102 of file gui_handler.cxx.

◆ OnBeforeResourceLoad()

cef_return_value_t GuiHandler::OnBeforeResourceLoad ( CefRefPtr< CefBrowser >  browser,
CefRefPtr< CefFrame >  frame,
CefRefPtr< CefRequest >  request,
CefRefPtr< CefResourceLoadCallBack callback 
)
overridevirtual

Definition at line 196 of file gui_handler.cxx.

◆ OnConsoleMessage()

bool GuiHandler::OnConsoleMessage ( CefRefPtr< CefBrowser >  browser,
cef_log_severity_t  level,
const CefString &  message,
const CefString &  source,
int  line 
)
overridevirtual

Definition at line 171 of file gui_handler.cxx.

◆ OnLoadError()

void GuiHandler::OnLoadError ( CefRefPtr< CefBrowser >  browser,
CefRefPtr< CefFrame >  frame,
ErrorCode  errorCode,
const CefString &  errorText,
const CefString &  failedUrl 
)
overridevirtual

Definition at line 132 of file gui_handler.cxx.

◆ OnTitleChange()

void GuiHandler::OnTitleChange ( CefRefPtr< CefBrowser >  browser,
const CefString &  title 
)
overridevirtual

Definition at line 60 of file gui_handler.cxx.

◆ PlatformInit()

bool GuiHandler::PlatformInit ( )
static

Definition at line 93 of file gui_handler_linux.cxx.

◆ PlatformTitleChange()

void GuiHandler::PlatformTitleChange ( CefRefPtr< CefBrowser >  browser,
const CefString &  title 
)
private

Definition at line 98 of file gui_handler_linux.cxx.

Member Data Documentation

◆ fBatchPageCount

int GuiHandler::fBatchPageCount {0}
private

Definition at line 132 of file gui_handler.h.

◆ fBrowserList

BrowserList GuiHandler::fBrowserList
protected

Definition at line 56 of file gui_handler.h.

◆ fConsole

int GuiHandler::fConsole {0}
protected

! console parameter, assigned via WebGui.Console rootrc parameter

Definition at line 54 of file gui_handler.h.

◆ fResourceManager

CefRefPtr<CefResourceManager> GuiHandler::fResourceManager
private

Definition at line 131 of file gui_handler.h.

◆ fServers

std::vector<THttpServer *> GuiHandler::fServers
protected

Definition at line 58 of file gui_handler.h.

◆ fUseViews

bool GuiHandler::fUseViews {false}
protected

! if view framework is used, required for true headless mode

Definition at line 53 of file gui_handler.h.

◆ is_closing_

bool GuiHandler::is_closing_
protected

Definition at line 60 of file gui_handler.h.

  • gui/cefdisplay/inc/gui_handler.h
  • gui/cefdisplay/src/gui_handler.cxx
  • gui/cefdisplay/src/gui_handler_linux.cxx
  • gui/cefdisplay/src/gui_handler_mac.mm
  • gui/cefdisplay/src/gui_handler_win.cc