FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
JSAPIProxyPtr FB::JSAPIProxy::create ( const FB::JSAPIPtr inner)
static

Creates a JSAPIProxy that holds a shared_ptr reference to the JSAPI object provided.

Parameters
innerthe API to reference; a reference to this API will be held and inner will not be released until this proxy object is released
Returns
boost::shared_ptr<JSAPIProxy>
Since
1.4a3

Definition at line 20 of file JSAPIProxy.cpp.

21 {
22  // This is necessary because you can't use shared_from_this in the constructor
23  FB::JSAPIProxyPtr ptr(new FB::JSAPIProxy(inner));
24  FB::JSAPIImplPtr impl(FB::ptr_cast<JSAPIImpl>(ptr));
25  if (impl)
26  impl->registerProxy(ptr);
27 
28  return ptr;
29 }
JavaScript API Wrapper – this can wrap any type of JSAPI object and be passed back to any browser tha...
Definition: JSAPIProxy.h:45