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

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

Issue 19744007: Create a public API around webkit::ppapi::PluginInstance and use it in chrome. After this, webkit/p… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and undo checkdeps change Created 7 years, 5 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') | webkit/plugins/ppapi/host_var_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/host_globals.cc
===================================================================
--- webkit/plugins/ppapi/host_globals.cc (revision 213462)
+++ webkit/plugins/ppapi/host_globals.cc (working copy)
@@ -21,7 +21,7 @@
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "webkit/plugins/plugin_switches.h"
#include "webkit/plugins/ppapi/plugin_module.h"
-#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h"
using ppapi::CheckIdType;
using ppapi::MakeTypedId;
@@ -119,14 +119,14 @@
::ppapi::thunk::ResourceCreationAPI* HostGlobals::GetResourceCreationAPI(
PP_Instance pp_instance) {
- PluginInstance* instance = GetInstance(pp_instance);
+ PluginInstanceImpl* instance = GetInstance(pp_instance);
if (!instance)
return NULL;
return &instance->resource_creation();
}
PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) {
- PluginInstance* inst = GetInstance(instance);
+ PluginInstanceImpl* inst = GetInstance(instance);
if (!inst)
return 0;
return inst->module()->pp_module();
@@ -150,7 +150,8 @@
PP_LogLevel level,
const std::string& source,
const std::string& value) {
- PluginInstance* instance_object = HostGlobals::Get()->GetInstance(instance);
+ PluginInstanceImpl* instance_object =
+ HostGlobals::Get()->GetInstance(instance);
if (instance_object) {
instance_object->container()->element().document().frame()->
addMessageToConsole(MakeLogMessage(level, source, value));
@@ -185,7 +186,7 @@
}
base::TaskRunner* HostGlobals::GetFileTaskRunner(PP_Instance instance) {
- scoped_refptr<PluginInstance> plugin_instance = GetInstance(instance);
+ scoped_refptr<PluginInstanceImpl> plugin_instance = GetInstance(instance);
DCHECK(plugin_instance.get());
scoped_refptr<base::MessageLoopProxy> message_loop =
plugin_instance->delegate()->GetFileThreadMessageLoopProxy();
@@ -235,7 +236,7 @@
return found->second;
}
-PP_Instance HostGlobals::AddInstance(PluginInstance* instance) {
+PP_Instance HostGlobals::AddInstance(PluginInstanceImpl* instance) {
DCHECK(instance_map_.find(instance->pp_instance()) == instance_map_.end());
// Use a random number for the instance ID. This helps prevent some
@@ -267,7 +268,7 @@
host_var_tracker_.DidDeleteInstance(instance);
}
-PluginInstance* HostGlobals::GetInstance(PP_Instance instance) {
+PluginInstanceImpl* HostGlobals::GetInstance(PP_Instance instance) {
DLOG_IF(ERROR, !CheckIdType(instance, ::ppapi::PP_ID_TYPE_INSTANCE))
<< instance << " is not a PP_Instance.";
InstanceMap::iterator found = instance_map_.find(instance);
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | webkit/plugins/ppapi/host_var_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698