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

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: 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 | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
===================================================================
--- content/renderer/pepper/renderer_ppapi_host_impl.cc (revision 213462)
+++ 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;
@@ -145,13 +146,18 @@
return delegate->pepper_browser_connection();
}
+webkit::ppapi::PluginInstanceImpl* RendererPpapiHostImpl::GetPluginInstanceImpl(
+ PP_Instance instance) const {
+ return GetAndValidateInstance(instance);
+}
+
ppapi::host::PpapiHost* RendererPpapiHostImpl::GetPpapiHost() {
return ppapi_host_.get();
}
RenderView* RendererPpapiHostImpl::GetRenderViewForInstance(
PP_Instance instance) const {
- PluginInstance* instance_object = GetAndValidateInstance(instance);
+ PluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
if (!instance_object)
return NULL;
@@ -161,8 +167,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 +178,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 +191,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 +202,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 +217,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 +269,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_))
« no previous file with comments | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698