Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::RWebBrowserHandle Class Reference

Specialized handle to hold information about running browser process Used to correctly cleanup all processes and temporary directories.

Definition at line 103 of file RWebDisplayHandle.cxx.

Public Member Functions

 RWebBrowserHandle (const std::string &url, const std::string &tmpdir, const std::string &tmpfile, browser_process_id pid)
 
 RWebBrowserHandle (const std::string &url, const std::string &tmpdir, const std::string &tmpfile, const std::string &dump)
 
 ~RWebBrowserHandle () override
 
- Public Member Functions inherited from ROOT::RWebDisplayHandle
 RWebDisplayHandle (const std::string &url)
 constructor
 
virtual ~RWebDisplayHandle ()=default
 required virtual destructor for correct cleanup at the end
 
const std::string & GetContent () const
 get content
 
const std::string & GetUrl () const
 returns url of start web display
 
virtual bool Resize (int, int)
 resize web window - if possible
 
void SetContent (const std::string &cont)
 set content
 

Private Types

typedef pid_t browser_process_id
 

Private Attributes

bool fHasPid {false}
 
browser_process_id fPid
 
std::string fTmpDir
 temporary directory to delete at the end
 
std::string fTmpFile
 temporary file to remove
 

Additional Inherited Members

- Static Public Member Functions inherited from ROOT::RWebDisplayHandle
static bool CanProduceImages (const std::string &browser="")
 Returns true if image production for specified browser kind is supported If browser not specified - use currently configured browser or try to test existing web browsers.
 
static std::unique_ptr< RWebDisplayHandleDisplay (const RWebDisplayArgs &args)
 Create web display.
 
static bool DisplayUrl (const std::string &url)
 Display provided url in configured web browser.
 
static bool NeedHttpServer (const RWebDisplayArgs &args)
 Check if http server required for display.
 
static bool ProduceImage (const std::string &fname, const std::string &json, int width=800, int height=600, const char *batch_file=nullptr)
 Produce image file using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
 
static bool ProduceImages (const std::string &fname, const std::vector< std::string > &jsons, const std::vector< int > &widths, const std::vector< int > &heights, const char *batch_file=nullptr)
 Produce image file(s) using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
 
- Static Protected Member Functions inherited from ROOT::RWebDisplayHandle
static bool CheckIfCanProduceImages (RWebDisplayArgs &args)
 Checks if configured browser can be used for image production.
 
static std::unique_ptr< Creator > & FindCreator (const std::string &name, const std::string &libname="")
 Search for specific browser creator If not found, try to add one.
 
static std::map< std::string, std::unique_ptr< Creator > > & GetMap ()
 Static holder of registered creators of web displays.
 
Inheritance diagram for ROOT::RWebBrowserHandle:
[legend]

Member Typedef Documentation

◆ browser_process_id

Definition at line 108 of file RWebDisplayHandle.cxx.

Constructor & Destructor Documentation

◆ RWebBrowserHandle() [1/2]

ROOT::RWebBrowserHandle::RWebBrowserHandle ( const std::string &  url,
const std::string &  tmpdir,
const std::string &  tmpfile,
const std::string &  dump 
)
inline

Definition at line 116 of file RWebDisplayHandle.cxx.

◆ RWebBrowserHandle() [2/2]

ROOT::RWebBrowserHandle::RWebBrowserHandle ( const std::string &  url,
const std::string &  tmpdir,
const std::string &  tmpfile,
browser_process_id  pid 
)
inline

Definition at line 122 of file RWebDisplayHandle.cxx.

◆ ~RWebBrowserHandle()

ROOT::RWebBrowserHandle::~RWebBrowserHandle ( )
inlineoverride

Definition at line 127 of file RWebDisplayHandle.cxx.

Member Data Documentation

◆ fHasPid

bool ROOT::RWebBrowserHandle::fHasPid {false}
private

Definition at line 112 of file RWebDisplayHandle.cxx.

◆ fPid

browser_process_id ROOT::RWebBrowserHandle::fPid
private

Definition at line 113 of file RWebDisplayHandle.cxx.

◆ fTmpDir

std::string ROOT::RWebBrowserHandle::fTmpDir
private

temporary directory to delete at the end

Definition at line 110 of file RWebDisplayHandle.cxx.

◆ fTmpFile

std::string ROOT::RWebBrowserHandle::fTmpFile
private

temporary file to remove

Definition at line 111 of file RWebDisplayHandle.cxx.

  • gui/webdisplay/src/RWebDisplayHandle.cxx