summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 18:04:32 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 18:04:32 +0000
commitadab2337689e8be9e1298ac01278876b3468a823 (patch)
tree1f0cf6b75255a9dec6e1fff2c3d9429a33f6e0f5 /chrome/renderer/pepper
parente20a6c216c041e057ebccc5974ca9042796ff8a2 (diff)
downloadchromium_src-adab2337689e8be9e1298ac01278876b3468a823.zip
chromium_src-adab2337689e8be9e1298ac01278876b3468a823.tar.gz
chromium_src-adab2337689e8be9e1298ac01278876b3468a823.tar.bz2
Put the pepper files which were moved in r213578 to the content namespace.
I added a "Pepper" prefix to WebPlugin and PluginInstance to avoid collision with the NPAPI versions. BUG=263054 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/20358002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper')
-rw-r--r--chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc4
-rw-r--r--chrome/renderer/pepper/pepper_flash_fullscreen_host.cc4
-rw-r--r--chrome/renderer/pepper/pepper_flash_renderer_host.cc10
-rw-r--r--chrome/renderer/pepper/pepper_pdf_host.cc22
-rw-r--r--chrome/renderer/pepper/pepper_shared_memory_message_filter.cc4
-rw-r--r--chrome/renderer/pepper/ppb_nacl_private_impl.cc6
-rw-r--r--chrome/renderer/pepper/ppb_pdf_impl.cc29
7 files changed, 45 insertions, 34 deletions
diff --git a/chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc b/chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc
index 26b6ef4..ca59c7ef 100644
--- a/chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc
+++ b/chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc
@@ -5,7 +5,7 @@
#include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h"
#include "base/files/file_path.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
@@ -46,7 +46,7 @@ int32_t PepperFlashDRMRendererHost::OnResourceMessageReceived(
int32_t PepperFlashDRMRendererHost::OnGetVoucherFile(
ppapi::host::HostMessageContext* context) {
- webkit::ppapi::PluginInstance* plugin_instance =
+ content::PepperPluginInstance* plugin_instance =
renderer_ppapi_host_->GetPluginInstance(pp_instance());
if (!plugin_instance)
return PP_ERROR_FAILED;
diff --git a/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc b/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
index edeb06b..37bea81 100644
--- a/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
+++ b/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
@@ -4,7 +4,7 @@
#include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
@@ -39,7 +39,7 @@ int32_t PepperFlashFullscreenHost::OnResourceMessageReceived(
int32_t PepperFlashFullscreenHost::OnSetFullscreen(
ppapi::host::HostMessageContext* context,
bool fullscreen) {
- webkit::ppapi::PluginInstance* plugin_instance =
+ content::PepperPluginInstance* plugin_instance =
renderer_ppapi_host_->GetPluginInstance(pp_instance());
if (plugin_instance) {
plugin_instance->FlashSetFullscreen(fullscreen, true);
diff --git a/chrome/renderer/pepper/pepper_flash_renderer_host.cc b/chrome/renderer/pepper/pepper_flash_renderer_host.cc
index 37561ae..e305946 100644
--- a/chrome/renderer/pepper/pepper_flash_renderer_host.cc
+++ b/chrome/renderer/pepper/pepper_flash_renderer_host.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "chrome/renderer/pepper/ppb_pdf_impl.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ipc/ipc_message_macros.h"
@@ -89,7 +89,7 @@ int32_t PepperFlashRendererHost::OnGetProxyForURL(
int32_t PepperFlashRendererHost::OnSetInstanceAlwaysOnTop(
ppapi::host::HostMessageContext* host_context,
bool on_top) {
- webkit::ppapi::PluginInstance* plugin_instance =
+ content::PepperPluginInstance* plugin_instance =
host_->GetPluginInstance(pp_instance());
if (plugin_instance)
plugin_instance->SetAlwaysOnTop(on_top);
@@ -206,8 +206,8 @@ int32_t PepperFlashRendererHost::OnNavigate(
const ppapi::URLRequestInfoData& data,
const std::string& target,
bool from_user_action) {
- // If our PluginInstance is already destroyed, just return a failure.
- webkit::ppapi::PluginInstance* plugin_instance =
+ // If our PepperPluginInstance is already destroyed, just return a failure.
+ content::PepperPluginInstance* plugin_instance =
host_->GetPluginInstance(pp_instance());
if (!plugin_instance)
return PP_ERROR_FAILED;
@@ -242,7 +242,7 @@ int32_t PepperFlashRendererHost::OnNavigate(
int32_t PepperFlashRendererHost::OnIsRectTopmost(
ppapi::host::HostMessageContext* host_context,
const PP_Rect& rect) {
- webkit::ppapi::PluginInstance* plugin_instance =
+ content::PepperPluginInstance* plugin_instance =
host_->GetPluginInstance(pp_instance());
if (plugin_instance && plugin_instance->IsRectTopmost(
gfx::Rect(rect.point.x, rect.point.y,rect.size.width, rect.size.height)))
diff --git a/chrome/renderer/pepper/pepper_pdf_host.cc b/chrome/renderer/pepper/pepper_pdf_host.cc
index debaf9c..172b1bc 100644
--- a/chrome/renderer/pepper/pepper_pdf_host.cc
+++ b/chrome/renderer/pepper/pepper_pdf_host.cc
@@ -8,7 +8,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/printing/print_web_view_helper.h"
#include "content/public/common/referrer.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/renderer_ppapi_host.h"
@@ -38,8 +38,6 @@
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/point.h"
-using webkit::ppapi::PluginInstance;
-
namespace chrome {
namespace {
@@ -179,7 +177,8 @@ int32_t PepperPDFHost::OnHostMsgGetLocalizedString(
int32_t PepperPDFHost::OnHostMsgDidStartLoading(
ppapi::host::HostMessageContext* context) {
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
instance->GetRenderView()->DidStartLoading();
@@ -188,7 +187,8 @@ int32_t PepperPDFHost::OnHostMsgDidStartLoading(
int32_t PepperPDFHost::OnHostMsgDidStopLoading(
ppapi::host::HostMessageContext* context) {
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
instance->GetRenderView()->DidStopLoading();
@@ -197,7 +197,8 @@ int32_t PepperPDFHost::OnHostMsgDidStopLoading(
int32_t PepperPDFHost::OnHostMsgSetContentRestriction(
ppapi::host::HostMessageContext* context, int restrictions) {
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
instance->GetRenderView()->Send(
@@ -226,7 +227,8 @@ int32_t PepperPDFHost::OnHostMsgUserMetricsRecordAction(
int32_t PepperPDFHost::OnHostMsgHasUnsupportedFeature(
ppapi::host::HostMessageContext* context) {
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
@@ -245,7 +247,8 @@ int32_t PepperPDFHost::OnHostMsgHasUnsupportedFeature(
int32_t PepperPDFHost::OnHostMsgPrint(
ppapi::host::HostMessageContext* context) {
#if defined(ENABLE_PRINTING)
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
@@ -265,7 +268,8 @@ int32_t PepperPDFHost::OnHostMsgPrint(
int32_t PepperPDFHost::OnHostMsgSaveAs(
ppapi::host::HostMessageContext* context) {
- PluginInstance* instance = host_->GetPluginInstance(pp_instance());
+ content::PepperPluginInstance* instance =
+ host_->GetPluginInstance(pp_instance());
if (!instance)
return PP_ERROR_FAILED;
GURL url = instance->GetPluginURL();
diff --git a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
index 00724e4..8aafd70e 100644
--- a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
+++ b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
@@ -8,7 +8,7 @@
#include "base/memory/shared_memory.h"
#include "base/process/process_handle.h"
#include "content/public/common/content_client.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
@@ -55,7 +55,7 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
base::SharedMemoryHandle host_shm_handle;
shm->ShareToProcess(base::GetCurrentProcessHandle(), &host_shm_handle);
- *host_handle_id = webkit::ppapi::PluginInstance::Get(instance)->
+ *host_handle_id = content::PepperPluginInstance::Get(instance)->
GetVarTracker()->TrackSharedMemoryHandle(instance, host_shm_handle, size);
base::PlatformFile host_handle =
diff --git a/chrome/renderer/pepper/ppb_nacl_private_impl.cc b/chrome/renderer/pepper/ppb_nacl_private_impl.cc
index 7ffe277..2c8d603 100644
--- a/chrome/renderer/pepper/ppb_nacl_private_impl.cc
+++ b/chrome/renderer/pepper/ppb_nacl_private_impl.cc
@@ -18,7 +18,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/sandbox_init.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -159,8 +159,8 @@ PP_ExternalPluginResult StartPpapiProxy(PP_Instance instance) {
InstanceInfo instance_info = it->second;
map.erase(it);
- webkit::ppapi::PluginInstance* plugin_instance =
- webkit::ppapi::PluginInstance::Get(instance);
+ content::PepperPluginInstance* plugin_instance =
+ content::PepperPluginInstance::Get(instance);
if (!plugin_instance) {
DLOG(ERROR) << "GetInstance() failed";
return PP_EXTERNAL_PLUGIN_ERROR_MODULE;
diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
index 0ac88b2..85e92e1 100644
--- a/chrome/renderer/pepper/ppb_pdf_impl.cc
+++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
@@ -14,7 +14,7 @@
#include "chrome/renderer/printing/print_web_view_helper.h"
#include "content/public/common/child_process_sandbox_support_linux.h"
#include "content/public/common/referrer.h"
-#include "content/public/renderer/ppapi_plugin_instance.h"
+#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "grit/webkit_resources.h"
@@ -38,7 +38,6 @@
#include "ui/base/resource/resource_bundle.h"
using ppapi::PpapiGlobals;
-using webkit::ppapi::PluginInstance;
using WebKit::WebElement;
using WebKit::WebView;
using content::RenderThread;
@@ -134,7 +133,8 @@ static const ResourceImageInfo kResourceImageMap[] = {
#if defined(ENABLE_PRINTING)
WebKit::WebElement GetWebElement(PP_Instance instance_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return WebKit::WebElement();
return instance->GetContainer()->element();
@@ -167,7 +167,8 @@ bool IsPrintingEnabled(PP_Instance instance_id) {
PP_Var GetLocalizedString(PP_Instance instance_id,
PP_ResourceString string_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return PP_MakeUndefined();
@@ -193,7 +194,7 @@ PP_Resource GetFontFileWithFallback(
PP_PrivateFontCharset charset) {
#if defined(OS_LINUX) || defined(OS_OPENBSD)
// Validate the instance before using it below.
- if (!PluginInstance::Get(instance_id))
+ if (!content::PepperPluginInstance::Get(instance_id))
return 0;
scoped_refptr<ppapi::StringVar> face_name(ppapi::StringVar::FromPPVar(
@@ -287,21 +288,24 @@ void SearchString(PP_Instance instance,
}
void DidStartLoading(PP_Instance instance_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return;
instance->GetRenderView()->DidStartLoading();
}
void DidStopLoading(PP_Instance instance_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return;
instance->GetRenderView()->DidStopLoading();
}
void SetContentRestriction(PP_Instance instance_id, int restrictions) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return;
instance->GetRenderView()->Send(
@@ -321,7 +325,8 @@ void UserMetricsRecordAction(PP_Instance instance, PP_Var action) {
}
void HasUnsupportedFeature(PP_Instance instance_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return;
@@ -336,7 +341,8 @@ void HasUnsupportedFeature(PP_Instance instance_id) {
}
void SaveAs(PP_Instance instance_id) {
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return;
GURL url = instance->GetPluginURL();
@@ -373,7 +379,8 @@ PP_Resource GetResourceImageForScale(PP_Instance instance_id,
return 0;
// Validate the instance.
- PluginInstance* instance = PluginInstance::Get(instance_id);
+ content::PepperPluginInstance* instance =
+ content::PepperPluginInstance::Get(instance_id);
if (!instance)
return 0;