| Index: webkit/plugins/ppapi/host_globals.h
|
| diff --git a/webkit/plugins/ppapi/host_globals.h b/webkit/plugins/ppapi/host_globals.h
|
| index db840aa85ed3c618935cf1e2ed71f063f525e027..8d0148a077971fa11e4936325b6a968ccfd9e365 100644
|
| --- a/webkit/plugins/ppapi/host_globals.h
|
| +++ b/webkit/plugins/ppapi/host_globals.h
|
| @@ -22,12 +22,17 @@ class PluginModule;
|
| class HostGlobals : public ::ppapi::PpapiGlobals {
|
| public:
|
| HostGlobals();
|
| + HostGlobals(::ppapi::PpapiGlobals::ForTest);
|
| virtual ~HostGlobals();
|
|
|
| // Getter for the global singleton. Generally, you should use
|
| // PpapiGlobals::Get() when possible. Use this only when you need some
|
| // host-specific functionality.
|
| - inline static HostGlobals* Get() { return host_globals_; }
|
| + inline static HostGlobals* Get() {
|
| + if (host_globals_)
|
| + return host_globals_;
|
| + return static_cast<HostGlobals*>(PpapiGlobals::Get());
|
| + }
|
|
|
| // PpapiGlobals implementation.
|
| virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE;
|
| @@ -38,6 +43,7 @@ class HostGlobals : public ::ppapi::PpapiGlobals {
|
| PP_Instance inst,
|
| ::ppapi::ApiID id) OVERRIDE;
|
| virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE;
|
| + virtual base::Lock* GetProxyLock() OVERRIDE;
|
|
|
| HostVarTracker* host_var_tracker() {
|
| return &host_var_tracker_;
|
|
|