diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/host_globals.cc | 18 | ||||
-rw-r--r-- | webkit/plugins/ppapi/host_globals.h | 12 |
2 files changed, 4 insertions, 26 deletions
diff --git a/webkit/plugins/ppapi/host_globals.cc b/webkit/plugins/ppapi/host_globals.cc index 7705dcc..ab51983 100644 --- a/webkit/plugins/ppapi/host_globals.cc +++ b/webkit/plugins/ppapi/host_globals.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -45,13 +45,8 @@ HostGlobals::HostGlobals() : ::ppapi::PpapiGlobals() { host_globals_ = this; } -HostGlobals::HostGlobals(::ppapi::PpapiGlobals::ForTest for_test) - : ::ppapi::PpapiGlobals(for_test) { - DCHECK(!host_globals_); -} - HostGlobals::~HostGlobals() { - DCHECK(host_globals_ == this || !host_globals_); + DCHECK(host_globals_ == this); host_globals_ = NULL; } @@ -121,11 +116,6 @@ PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) { return inst->module()->pp_module(); } -base::Lock* HostGlobals::GetProxyLock() { - // We do not lock on the host side. - return NULL; -} - PP_Module HostGlobals::AddModule(PluginModule* module) { #ifndef NDEBUG // Make sure we're not adding one more than once. @@ -207,9 +197,5 @@ PluginInstance* HostGlobals::GetInstance(PP_Instance instance) { return found->second->instance; } -bool HostGlobals::IsHostGlobals() const { - return true; -} - } // namespace ppapi } // namespace webkit diff --git a/webkit/plugins/ppapi/host_globals.h b/webkit/plugins/ppapi/host_globals.h index d0926bc..db840aa 100644 --- a/webkit/plugins/ppapi/host_globals.h +++ b/webkit/plugins/ppapi/host_globals.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -22,16 +22,12 @@ 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() { - DCHECK(PpapiGlobals::Get()->IsHostGlobals()); - return static_cast<HostGlobals*>(PpapiGlobals::Get()); - } + inline static HostGlobals* Get() { return host_globals_; } // PpapiGlobals implementation. virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; @@ -42,7 +38,6 @@ 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_; @@ -80,9 +75,6 @@ class HostGlobals : public ::ppapi::PpapiGlobals { WEBKIT_PLUGINS_EXPORT PluginInstance* GetInstance(PP_Instance instance); private: - // PpapiGlobals overrides. - virtual bool IsHostGlobals() const OVERRIDE; - // Per-instance data we track. struct InstanceData; |