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_)) |