16#ifndef ROOT7_RWebDisplayHandle
17#define ROOT7_RWebDisplayHandle
26namespace Experimental {
44 void TestProg(
const std::string &nexttry,
bool check_std_paths =
false);
47 virtual std::string
MakeProfile(std::string &,
bool) {
return ""; }
64 std::string
MakeProfile(std::string &exec,
bool)
override;
72 std::string
MakeProfile(std::string &exec,
bool batch)
override;
77 static std::map<std::string, std::unique_ptr<Creator>> &
GetMap();
79 static std::unique_ptr<Creator> &
FindCreator(
const std::string &
name,
const std::string &libname =
"");
92 static bool DisplayUrl(
const std::string &url);
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
std::string fExec
standard execute line
virtual std::string MakeProfile(std::string &, bool)
void TestProg(const std::string &nexttry, bool check_std_paths=false)
Check if browser executable exists and can be used.
virtual ~BrowserCreator()=default
std::string fBatchExec
batch execute line
std::string fProg
browser executable
BrowserCreator(bool custom=true, const std::string &exec="")
Class to handle starting of web-browsers like Chrome or Firefox.
virtual void ProcessGeometry(std::string &, const RWebDisplayArgs &)
std::unique_ptr< RWebDisplayHandle > Display(const RWebDisplayArgs &args) override
Display given URL in web browser.
ChromeCreator()
Constructor.
void ProcessGeometry(std::string &, const RWebDisplayArgs &args) override
virtual ~ChromeCreator()=default
std::string MakeProfile(std::string &exec, bool) override
Handle profile argument.
bool IsActive() const override
virtual bool IsActive() const
virtual std::unique_ptr< RWebDisplayHandle > Display(const RWebDisplayArgs &args)=0
virtual ~Creator()=default
FirefoxCreator()
Constructor.
std::string MakeProfile(std::string &exec, bool batch) override
Create Firefox profile to run independent browser window.
bool IsActive() const override
virtual ~FirefoxCreator()=default
static bool DisplayUrl(const std::string &url)
Display provided url in configured web browser.
std::string GetUrl() const
RWebDisplayHandle(const std::string &url)
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::unique_ptr< RWebDisplayHandle > Display(const RWebDisplayArgs &args)
Create web display.
static std::map< std::string, std::unique_ptr< Creator > > & GetMap()
!< URL used to launch display
virtual ~RWebDisplayHandle()=default