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

Unified Diff: chrome/renderer/render_view.cc

Issue 475004: Revert 34161 - Enable Pepper support by default, including building the test ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years 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 | « chrome/common/chrome_switches.cc ('k') | webkit/glue/plugins/npapi_extension_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 34161)
+++ chrome/renderer/render_view.cc (working copy)
@@ -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 @@
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;
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/glue/plugins/npapi_extension_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698