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

Unified Diff: content/renderer/pepper/renderer_ppapi_host_impl.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: 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
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
===================================================================
--- content/renderer/pepper/renderer_ppapi_host_impl.cc (revision 213350)
+++ content/renderer/pepper/renderer_ppapi_host_impl.cc (working copy)
@@ -27,10 +27,11 @@
#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/plugin_delegate.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 webkit::ppapi::HostGlobals;
using webkit::ppapi::PluginInstance;
+using webkit::ppapi::PluginInstanceImpl;
using webkit::ppapi::PluginModule;
namespace content {
@@ -112,7 +113,7 @@
// static
RendererPpapiHostImpl* RendererPpapiHostImpl::GetForPPInstance(
PP_Instance pp_instance) {
- PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance);
+ PluginInstanceImpl* instance = HostGlobals::Get()->GetInstance(pp_instance);
if (!instance)
return NULL;
@@ -124,14 +125,14 @@
scoped_ptr< ::ppapi::thunk::ResourceCreationAPI>
RendererPpapiHostImpl::CreateInProcessResourceCreationAPI(
- PluginInstance* instance) {
+ PluginInstanceImpl* instance) {
return scoped_ptr< ::ppapi::thunk::ResourceCreationAPI>(
new PepperInProcessResourceCreation(this, instance));
}
PepperBrowserConnection*
RendererPpapiHostImpl::GetBrowserConnection(PP_Instance instance) const {
- PluginInstance* instance_object = GetAndValidateInstance(instance);
+ PluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
if (!instance_object)
return NULL;
@@ -151,7 +152,7 @@
RenderView* RendererPpapiHostImpl::GetRenderViewForInstance(
PP_Instance instance) const {
- PluginInstance* instance_object = GetAndValidateInstance(instance);
+ PluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
if (!instance_object)
return NULL;
@@ -161,8 +162,7 @@
instance_object->delegate())->render_view();
}
-bool RendererPpapiHostImpl::IsValidInstance(
- PP_Instance instance) const {
+bool RendererPpapiHostImpl::IsValidInstance(PP_Instance instance) const {
return !!GetAndValidateInstance(instance);
}
@@ -173,7 +173,7 @@
WebKit::WebPluginContainer* RendererPpapiHostImpl::GetContainerForInstance(
PP_Instance instance) const {
- PluginInstance* instance_object = GetAndValidateInstance(instance);
+ PluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
if (!instance_object)
return NULL;
return instance_object->container();
@@ -186,7 +186,7 @@
}
bool RendererPpapiHostImpl::HasUserGesture(PP_Instance instance) const {
- PluginInstance* instance_object = GetAndValidateInstance(instance);
+ PluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
if (!instance_object)
return false;
@@ -197,7 +197,7 @@
}
int RendererPpapiHostImpl::GetRoutingIDForWidget(PP_Instance instance) const {
- webkit::ppapi::PluginInstance* plugin_instance =
+ webkit::ppapi::PluginInstanceImpl* plugin_instance =
GetAndValidateInstance(instance);
if (!plugin_instance)
return 0;
@@ -212,7 +212,7 @@
gfx::Point RendererPpapiHostImpl::PluginPointToRenderView(
PP_Instance instance,
const gfx::Point& pt) const {
- webkit::ppapi::PluginInstance* plugin_instance =
+ webkit::ppapi::PluginInstanceImpl* plugin_instance =
GetAndValidateInstance(instance);
if (!plugin_instance)
return pt;
@@ -264,9 +264,9 @@
}
}
-PluginInstance* RendererPpapiHostImpl::GetAndValidateInstance(
+PluginInstanceImpl* RendererPpapiHostImpl::GetAndValidateInstance(
PP_Instance pp_instance) const {
- PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance);
+ PluginInstanceImpl* instance = HostGlobals::Get()->GetInstance(pp_instance);
if (!instance)
return NULL;
if (!instance->IsValidInstanceOf(module_))

Powered by Google App Engine
This is Rietveld 408576698