summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 17:45:03 +0000
committersehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 17:45:03 +0000
commitc2dff4977f8dbd35fd467fb3785587cb634dd190 (patch)
tree5ee05f387a75d856d29895f06f0c64156754c9ff /chrome
parent5f6397ecb4c7bc92295adc8d21bd87e698ac5622 (diff)
downloadchromium_src-c2dff4977f8dbd35fd467fb3785587cb634dd190.zip
chromium_src-c2dff4977f8dbd35fd467fb3785587cb634dd190.tar.gz
chromium_src-c2dff4977f8dbd35fd467fb3785587cb634dd190.tar.bz2
Revert 34161 - Enable Pepper support by default, including building the test plugin.
This is needed because the NaCl plugin code that runs in the renderer needs to use Pepper APIs all the time, and NaCl support has been enabled by default for several months now. To cause an untrusted Pepper plugin to run in the renderer one needs to specify the internalpepper flag. I have also removed the enable_pepper flag from gyp. As the build of the GPU process was tied to this flag, I have renamed the flag to enable_gpu. TEST=none BUG=none Review URL: http://codereview.chromium.org/464074 TBR=sehr@google.com Review URL: http://codereview.chromium.org/475004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rwxr-xr-xchrome/chrome_renderer.gypi2
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/renderer/render_view.cc32
5 files changed, 13 insertions, 26 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 05a452d..c7325ad 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -517,7 +517,6 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
switches::kSimpleDataSource,
switches::kEnableBenchmarking,
switches::kInternalNaCl,
- switches::kInternalPepper,
switches::kDisableByteRangeSupport,
switches::kDisableDatabases,
switches::kDisableDesktopNotifications,
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index ebe31de..f1e7c36c 100755
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -148,7 +148,7 @@
],
},
'conditions': [
- ['enable_gpu==1', {
+ ['enable_pepper==1', {
'dependencies': [
'../gpu/gpu.gyp:gpu_plugin',
],
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index f64b451..3160bd8 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -313,9 +313,6 @@ const char kIncognito[] = "incognito";
// Runs the Native Client inside the renderer process.
const char kInternalNaCl[] = "internal-nacl";
-// Runs a trusted Pepper plugin inside the renderer process.
-const char kInternalPepper[] = "internal-pepper";
-
// Specifies the flags passed to JS engine
const char kJavaScriptFlags[] = "js-flags";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 9698cdf..5d97788 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -99,7 +99,6 @@ extern const char kImport[];
extern const char kInProcessPlugins[];
extern const char kIncognito[];
extern const char kInternalNaCl[];
-extern const char kInternalPepper[];
extern const char kJavaScriptFlags[];
extern const char kLoadExtension[];
extern const char kLoadPlugin[];
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index c9d4f44..4718a5c 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2,6 +2,10 @@
// 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>
@@ -2637,36 +2641,24 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
else
mime_type_to_use = &mime_type;
- bool use_pepper_host = false;
- bool in_process_plugin = RenderProcess::current()->in_process_plugins();
- // Check for trusted Pepper plugins.
+#if defined(PEPPER_APIS_ENABLED)
const char kPepperPrefix[] = "pepper-";
if (StartsWithASCII(*mime_type_to_use, kPepperPrefix, true)) {
- 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;
- }
+ return WebPluginDelegatePepper::Create(
+ path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
}
- // Check for Native Client modules.
+#endif
+
+ bool in_process_plugin = RenderProcess::current()->in_process_plugins();
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.
- 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_));
- }
+ return WebPluginDelegateImpl::Create(
+ path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
#else
NOTIMPLEMENTED();
return NULL;