Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: webkit/plugins/ppapi/host_globals.cc

Issue 9034035: Make it possible to have 1 PpapiGlobals per thread. Update unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/host_globals.cc
diff --git a/webkit/plugins/ppapi/host_globals.cc b/webkit/plugins/ppapi/host_globals.cc
index ab5198353992e43f9a5fbed69a349db243caa016..fe44423f8f985722fa6e06c808f76350fb952c65 100644
--- a/webkit/plugins/ppapi/host_globals.cc
+++ b/webkit/plugins/ppapi/host_globals.cc
@@ -45,8 +45,13 @@ 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);
+ DCHECK(host_globals_ == this || !host_globals_);
host_globals_ = NULL;
}
@@ -116,6 +121,11 @@ 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.
@@ -197,5 +207,9 @@ PluginInstance* HostGlobals::GetInstance(PP_Instance instance) {
return found->second->instance;
}
+bool HostGlobals::IsHostGlobals() const {
+ return true;
+}
+
} // namespace ppapi
} // namespace webkit
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698