summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorsehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 03:21:14 +0000
committersehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 03:21:14 +0000
commitd2139663640f674e7c56b1e139616c62c2b58885 (patch)
tree9afede65658f12bd00bf6cbf416a66e33c7737f1 /chrome/renderer
parent665112a28e524eed5892bc1eebb453ae3f0d64c3 (diff)
downloadchromium_src-d2139663640f674e7c56b1e139616c62c2b58885.zip
chromium_src-d2139663640f674e7c56b1e139616c62c2b58885.tar.gz
chromium_src-d2139663640f674e7c56b1e139616c62c2b58885.tar.bz2
Re-enable the build of Pepper support by default (issue 464074, svn revision 34161).
There were problems building Skia and others for the 64-bit linux versions of the Pepper test plugin, so I have disabled building that plugin except on Windows for now and added a TODO. One significant addition to the previous comment lines. The flag enable_gpu=1 now causes the build definition ENABLE_GPU=1 to allow guarding of dependent code. BUG=none TEST=none Review URL: http://codereview.chromium.org/481001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc32
1 files changed, 20 insertions, 12 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 4718a5c..c9d4f44 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#if defined(ENABLE_PEPPER)
-#define PEPPER_APIS_ENABLED
-#endif
-
#include "chrome/renderer/render_view.h"
#include <algorithm>
@@ -2641,24 +2637,36 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
else
mime_type_to_use = &mime_type;
-#if defined(PEPPER_APIS_ENABLED)
+ bool use_pepper_host = false;
+ bool in_process_plugin = RenderProcess::current()->in_process_plugins();
+ // Check for trusted Pepper plugins.
const char kPepperPrefix[] = "pepper-";
if (StartsWithASCII(*mime_type_to_use, kPepperPrefix, true)) {
- return WebPluginDelegatePepper::Create(
- path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kInternalPepper)) {
+ in_process_plugin = true;
+ use_pepper_host = true;
+ } else {
+ // In process Pepper plugins must be explicitly enabled.
+ return NULL;
+ }
}
-#endif
-
- bool in_process_plugin = RenderProcess::current()->in_process_plugins();
+ // Check for Native Client modules.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) {
if (mime_type == "application/x-nacl-srpc") {
in_process_plugin = true;
+ use_pepper_host = true;
}
}
if (in_process_plugin) {
#if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac.
- return WebPluginDelegateImpl::Create(
- path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
+ if (use_pepper_host) {
+ return WebPluginDelegatePepper::Create(
+ path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
+ } else {
+ return WebPluginDelegateImpl::Create(
+ path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
+ }
#else
NOTIMPLEMENTED();
return NULL;