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

Definition at line 37 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)
 
bool DoClose (CefRefPtr< CefBrowser > browser) override
 
CefRefPtr< CefDisplayHandlerGetDisplayHandler () override
 
CefRefPtr< CefLifeSpanHandlerGetLifeSpanHandler () override
 
CefRefPtr< CefLoadHandlerGetLoadHandler () override
 
CefRefPtr< CefRequestHandlerGetRequestHandler () override
 
CefRefPtr< CefResourceHandlerGetResourceHandler (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefRefPtr< CefRequest > request) override
 
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.
 
void OnAfterCreated (CefRefPtr< CefBrowser > browser) override
 
void OnBeforeClose (CefRefPtr< CefBrowser > browser) override
 
cef_return_value_t OnBeforeResourceLoad (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefRefPtr< CefRequest > request, CefRefPtr< CefCallback > callback) override
 
bool OnConsoleMessage (CefRefPtr< CefBrowser > browser, cef_log_severity_t level, const CefString &message, const CefString &source, int line) override
 
void OnLoadError (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, ErrorCode errorCode, const CefString &errorText, const CefString &failedUrl) override
 
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 ()
 
static bool PlatformResize (CefRefPtr< CefBrowser > browser, int width, int height)
 

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_ {false}
 

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 47 of file gui_handler.h.

Constructor & Destructor Documentation

◆ GuiHandler()

GuiHandler::GuiHandler ( bool  use_views = false)
explicit

Definition at line 52 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 430 of file gui_handler.cxx.

◆ CloseAllBrowsers()

void GuiHandler::CloseAllBrowsers ( bool  force_close)

Definition at line 154 of file gui_handler.cxx.

◆ DISALLOW_COPY_AND_ASSIGN()

GuiHandler::DISALLOW_COPY_AND_ASSIGN ( GuiHandler  )
private

◆ DoClose()

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

Definition at line 86 of file gui_handler.cxx.

◆ GetDataURI()

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

Definition at line 125 of file gui_handler.cxx.

◆ GetDisplayHandler()

CefRefPtr< CefDisplayHandler > GuiHandler::GetDisplayHandler ( )
inlineoverride

Definition at line 63 of file gui_handler.h.

◆ GetLifeSpanHandler()

CefRefPtr< CefLifeSpanHandler > GuiHandler::GetLifeSpanHandler ( )
inlineoverride

Definition at line 61 of file gui_handler.h.

◆ GetLoadHandler()

CefRefPtr< CefLoadHandler > GuiHandler::GetLoadHandler ( )
inlineoverride

Definition at line 62 of file gui_handler.h.

◆ GetRequestHandler()

CefRefPtr< CefRequestHandler > GuiHandler::GetRequestHandler ( )
inlineoverride

Definition at line 64 of file gui_handler.h.

◆ GetResourceHandler()

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

Definition at line 332 of file gui_handler.cxx.

◆ GetResourceRequestHandler()

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 
)
inlineoverride

Definition at line 89 of file gui_handler.h.

◆ IMPLEMENT_REFCOUNTING()

GuiHandler::IMPLEMENT_REFCOUNTING ( GuiHandler  )
private

◆ IsClosing()

bool GuiHandler::IsClosing ( ) const
inline

Definition at line 86 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 445 of file gui_handler.cxx.

◆ OnAfterCreated()

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

Definition at line 78 of file gui_handler.cxx.

◆ OnBeforeClose()

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

Definition at line 103 of file gui_handler.cxx.

◆ OnBeforeResourceLoad()

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

Definition at line 194 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 
)
override

Definition at line 169 of file gui_handler.cxx.

◆ OnLoadError()

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

Definition at line 132 of file gui_handler.cxx.

◆ OnTitleChange()

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

Definition at line 61 of file gui_handler.cxx.

◆ PlatformInit()

bool GuiHandler::PlatformInit ( )
static

Definition at line 117 of file gui_handler_linux.cxx.

◆ PlatformResize()

bool GuiHandler::PlatformResize ( CefRefPtr< CefBrowser >  browser,
int  width,
int  height 
)
static

Definition at line 127 of file gui_handler_linux.cxx.

◆ PlatformTitleChange()

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

Definition at line 122 of file gui_handler_linux.cxx.

Member Data Documentation

◆ fBatchPageCount

int GuiHandler::fBatchPageCount {0}
private

Definition at line 126 of file gui_handler.h.

◆ fBrowserList

BrowserList GuiHandler::fBrowserList
protected

Definition at line 48 of file gui_handler.h.

◆ fConsole

int GuiHandler::fConsole {0}
protected

! console parameter, assigned via WebGui.Console rootrc parameter

Definition at line 46 of file gui_handler.h.

◆ fResourceManager

CefRefPtr<CefResourceManager> GuiHandler::fResourceManager
private

Definition at line 125 of file gui_handler.h.

◆ fServers

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

Definition at line 50 of file gui_handler.h.

◆ fUseViews

bool GuiHandler::fUseViews {false}
protected

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

Definition at line 45 of file gui_handler.h.

◆ is_closing_

bool GuiHandler::is_closing_ {false}
protected

Definition at line 52 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