FB::BrowserHost Class Reference
Browser host base class. More...
#include <BrowserHost.h>
Inheritance diagram for FB::BrowserHost:

Public Member Functions | |
| BrowserHost () | |
| Default constructor. | |
| virtual | ~BrowserHost () |
| Finaliser. | |
| bool | ScheduleAsyncCall (void(*func)(void *), void *userData) const |
| Schedule asynchronous call to be executed on the main thread. | |
| template<class Functor > | |
| Functor::result_type | CallOnMainThread (Functor func) const |
| Execute a call on the main thread, wait for the result, and return it. | |
| template<class C , class Functor > | |
| void | ScheduleOnMainThread (const boost::shared_ptr< C > &obj, Functor func) const |
| Schedule a call to be executed on the main thread. | |
| virtual void * | getContextID () const =0 |
| Gets a unique identifier for this BrowserHost. There are cases where you may need multiple BrowserHosts in a single FireBreath plugin, primarily if you are embedding some sort of web browser inside your plugin, and this is needed for that. | |
| virtual BrowserStreamPtr | createStream (const std::string &url, const PluginEventSinkPtr &callback, bool cache=true, bool seekable=false, size_t internalBufferSize=128 *1024) const |
| Creates a BrowserStream (deprecated since 1.7.0). | |
| virtual BrowserStreamPtr | createUnsolicitedStream (const BrowserStreamRequest &req) const |
| Used internally to create a BrowserStream to handle an unsolicited NPP_NewStream. | |
| void | assertMainThread () const |
| When running in debug mode, asserts that the call is made on the main thread. | |
| bool | isMainThread () const |
| Query if this object is on the main thread. | |
| virtual DOM::DocumentPtr | getDOMDocument ()=0 |
| Gets a DOM::Document wrapper for the document object that the plugin resides in. | |
| virtual DOM::WindowPtr | getDOMWindow ()=0 |
| Gets a DOM::Window wrapper for the DOM/JS window object that the plugin resides in. | |
| virtual DOM::ElementPtr | getDOMElement ()=0 |
| Gets a DOM::Element wrapper for the DOM/JS object tag that the plugin resides in. | |
| virtual void | Navigate (const std::string &url, const std::string &target) |
| Instructs the browser to navigate to the specified url in the target window. | |
| virtual void | evaluateJavaScript (const std::string &script)=0 |
| Evaluates arbitrary javascript; note that it does not return the result due to cross- browser compatibility issues. | |
| virtual void | evaluateJavaScript (const std::wstring &script) |
| int | delayedInvoke (const int delayms, const FB::JSObjectPtr &func, const FB::VariantList &args, const std::string &fname="") |
| Executes the provided method object after a delay using window.setTimeout. | |
| virtual void | htmlLog (const std::string &str) |
| Sends a log message to the containing web page using Console.log (firebug). | |
| virtual void | setEnableHtmlLog (const bool enabled=true) |
| Enables or disables the htmlLog method. | |
| virtual void | shutdown () |
| Notifies the browserhost object that the associated plugin object is shutting down. | |
| bool | isShutDown () const |
| returns true if the FB::BrowserHost::shutdown() method has been called on this object | |
| void | freeRetainedObjects () const |
| releases all JSAPI objects that have been passed to the browser | |
| void | retainJSAPIPtr (const FB::JSAPIPtr &obj) const |
| retains an instance of the JSAPI object until the plugin shuts down | |
| void | releaseJSAPIPtr (const FB::JSAPIPtr &obj) const |
| releases the specified JSAPI object to allow it to be invalidated and freed. This is done automatically for all retained objects on shutdown | |
| virtual void | DoDeferredRelease () const =0 |
| Releases any browser-specific objects that were destroyed on a thread other than the main thread. Usually safe to just let FireBreath deal with this. | |
| virtual bool | DetectProxySettings (std::map< std::string, std::string > &settingsMap, const std::string &url="") |
| Detects the proxy settings from the browser. | |
Static Public Member Functions | |
| static void | AsyncHtmlLog (void *data) |
| Don't call this; it is a helper function used by htmlLog. | |
| static int | getInstanceCount () |
| Returns the count of how many BrowserHost object instances are active. | |
Detailed Description
Browser host base class.
In actual use, this class will be used as either a NpapiBrowserHost or a ActiveXBrowserHost. This class provides APIs for making calls to the browser of any kind. It is also used for making calls on the primary thread. There will always be exactly one BrowserHost object per plugin instance and it is unique to that instance
- See also:
- NpapiBrowserHost
- ActiveXBrowserHost
Definition at line 69 of file BrowserHost.h.
The documentation for this class was generated from the following files:
Generated on 19 Jun 2013 for FireBreath by
1.6.1
Labels
Page: class FB BrowserHost Members
Page: class FB BrowserHost delayedInvoke
Page: class FB BrowserHost assertMainThread
Page: class FB BrowserHost evaluateJavaScript
Page: class FB BrowserHost getDOMElement
Page: class FB BrowserHost htmlLog
Page: class FB BrowserHost ~BrowserHost
Page: class FB BrowserHost getContextID
Page: class FB BrowserHost getDOMWindow
Page: class FB BrowserHost retainJSAPIPtr
Page: class FB BrowserHost ScheduleAsyncCall
Page: class FB BrowserHost freeRetainedObjects
Page: class FB BrowserHost DetectProxySettings
Page: class FB BrowserHost ScheduleOnMainThread
Page: class FB BrowserHost evaluateJavaScript (2)
Page: class FB BrowserHost releaseJSAPIPtr
Page: class FB BrowserHost BrowserHost
Page: class FB BrowserHost Navigate
Page: class FB BrowserHost DoDeferredRelease
Page: class FB BrowserHost getDOMDocument
Page: class FB BrowserHost setEnableHtmlLog
Page: class FB BrowserHost getInstanceCount
Page: class FB BrowserHost createUnsolicitedStream
Page: class FB BrowserHost isMainThread
Page: class FB BrowserHost isShutDown
Page: class FB BrowserHost AsyncHtmlLog
Page: class FB BrowserHost createStream
Page: class FB BrowserHost shutdown
Page: class FB BrowserHost CallOnMainThread
