0

Remove content/public/plugin and chrome/plugin

This is not needed anymore now that NPAPI is gone.

BUG=493212

Review URL: https://codereview.chromium.org/1856963002

Cr-Commit-Position: refs/heads/master@{#385102}
This commit is contained in:
piman
2016-04-04 21:27:21 -07:00
committed by Commit bot
parent a605d4e528
commit 72dcbed943
33 changed files with 19 additions and 264 deletions

@ -13,7 +13,6 @@
namespace content {
class ShellContentRendererClient;
class ShellContentPluginClient;
class ShellContentUtilityClient;
}

@ -494,7 +494,6 @@ group("child_dependencies") {
public_deps += [
"//chrome/browser/devtools",
"//chrome/child",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//content/public/child",
@ -1019,7 +1018,6 @@ if (is_android) {
"//chrome/browser/ui",
"//chrome/child",
"//chrome/common",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//components/safe_browsing_db:safe_browsing_db_mobile",

@ -325,7 +325,6 @@ source_set("test_support") {
"//chrome/browser/policy:path_parser",
"//chrome/child",
"//chrome/common",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//components/crash/content/app",

@ -6,7 +6,6 @@ include_rules = [
"+chrome/common/chrome_features.h",
"+chrome/grit", # For generated headers
"+chrome/installer",
"+chrome/plugin/chrome_content_plugin_client.h",
"+chrome/renderer/chrome_content_renderer_client.h",
"+chrome/utility/chrome_content_utility_client.h",
"+chrome_elf/chrome_elf_main.h",

@ -40,7 +40,6 @@
#include "chrome/common/switch_utils.h"
#include "chrome/common/trace_event_args_whitelist.h"
#include "chrome/common/url_constants.h"
#include "chrome/plugin/chrome_content_plugin_client.h"
#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/utility/chrome_content_utility_client.h"
#include "components/component_updater/component_updater_paths.h"
@ -145,8 +144,6 @@ base::LazyInstance<ChromeContentRendererClient>
g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<ChromeContentUtilityClient>
g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<ChromeContentPluginClient>
g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER;
#endif
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
@ -984,14 +981,6 @@ ChromeMainDelegate::CreateContentBrowserClient() {
#endif
}
content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() {
#if defined(CHROME_MULTIPLE_DLL_BROWSER)
return NULL;
#else
return g_chrome_content_plugin_client.Pointer();
#endif
}
content::ContentRendererClient*
ChromeMainDelegate::CreateContentRendererClient() {
#if defined(CHROME_MULTIPLE_DLL_BROWSER)

@ -46,7 +46,6 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
bool ShouldEnableProfilerRecording() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentPluginClient* CreateContentPluginClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
content::ContentUtilityClient* CreateContentUtilityClient() override;

@ -32,7 +32,6 @@
],
'chromium_child_dependencies': [
'child',
'plugin',
'renderer',
'utility',
'../content/content.gyp:content_gpu',
@ -114,7 +113,6 @@
'chrome_dll.gypi',
'chrome_exe.gypi',
'chrome_installer.gypi',
'chrome_plugin.gypi',
'chrome_renderer.gypi',
'chrome_tests.gypi',
'chrome_tests_unit.gypi',

@ -15,7 +15,6 @@
'chrome.gyp:browser_ui',
'chrome.gyp:child',
'chrome_features.gyp:chrome_common_features',
'chrome.gyp:plugin',
'chrome.gyp:renderer',
'chrome.gyp:utility',
'../components/components.gyp:safe_browsing_db_mobile',

@ -1,27 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'plugin',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'../base/base.gyp:base',
'../gin/gin.gyp:gin',
'chrome_features.gyp:chrome_common_features',
'chrome_resources.gyp:chrome_strings',
],
'include_dirs': [
'..',
'<(grit_out_dir)',
],
'sources': [
'plugin/chrome_content_plugin_client.cc',
'plugin/chrome_content_plugin_client.h',
],
},
],
}

@ -1858,7 +1858,6 @@
['OS!="ios"', {
'dependencies': [
'child',
'plugin',
'renderer',
'utility',
'../content/content.gyp:content_gpu',

@ -1,22 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("plugin") {
sources = [
"chrome_content_plugin_client.cc",
"chrome_content_plugin_client.h",
]
configs += [
"//build/config/compiler:wexit_time_destructors",
"//v8:external_startup_data",
]
deps = [
"//base",
"//chrome:strings",
"//content/public/plugin",
"//gin",
]
}

@ -1,6 +0,0 @@
include_rules = [
"+content/public/plugin",
"+gin/public/isolate_holder.h",
"+gin/v8_initializer.h",
"+media/base",
]

@ -1,16 +0,0 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/plugin/chrome_content_plugin_client.h"
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
#include "gin/v8_initializer.h"
#endif
void ChromeContentPluginClient::PreSandboxInitialization() {
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
gin::V8Initializer::LoadV8Snapshot();
gin::V8Initializer::LoadV8Natives();
#endif
}

@ -1,15 +0,0 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_
#define CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_
#include "content/public/plugin/content_plugin_client.h"
class ChromeContentPluginClient : public content::ContentPluginClient {
public:
void PreSandboxInitialization() override;
};
#endif // CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_

@ -130,7 +130,6 @@ source_set("test_support") {
if (!is_ios) {
public_deps += [
"//chrome/child",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//components/autofill/core/browser:test_support",
@ -142,7 +141,6 @@ source_set("test_support") {
"//components/web_resource:test_support",
"//content/public/child",
"//content/public/common",
"//content/public/plugin",
"//content/public/renderer",
"//content/public/utility",
"//google_apis:test_support",

@ -62,7 +62,6 @@ if (!is_nacl_nonsfi) {
"//content/public/child:child_sources",
"//content/public/gpu:gpu_sources",
"//content/public/common:common_sources",
"//content/public/plugin:plugin_sources",
"//content/public/renderer:renderer_sources",
"//content/public/utility:utility_sources",
]

@ -56,7 +56,6 @@
#include "content/public/common/main_function_params.h"
#include "content/public/common/sandbox_init.h"
#include "content/public/gpu/content_gpu_client.h"
#include "content/public/plugin/content_plugin_client.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/utility/content_utility_client.h"
#include "content/renderer/in_process_renderer_thread.h"
@ -133,8 +132,6 @@ base::LazyInstance<ContentBrowserClient>
#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
base::LazyInstance<ContentGpuClient>
g_empty_content_gpu_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<ContentPluginClient>
g_empty_content_plugin_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<ContentRendererClient>
g_empty_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<ContentUtilityClient>
@ -236,16 +233,9 @@ class ContentClientInitializer {
content_client->gpu_ = &g_empty_content_gpu_client.Get();
}
if (process_type == switches::kPluginProcess ||
process_type == switches::kPpapiPluginProcess) {
if (delegate)
content_client->plugin_ = delegate->CreateContentPluginClient();
if (!content_client->plugin_)
content_client->plugin_ = &g_empty_content_plugin_client.Get();
// Single process not supported in split dll mode.
} else if (process_type == switches::kRendererProcess ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess)) {
if (process_type == switches::kRendererProcess ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess)) {
if (delegate)
content_client->renderer_ = delegate->CreateContentRendererClient();
if (!content_client->renderer_)

@ -1,46 +0,0 @@
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'conditions': [
['enable_plugins==1 and OS!="linux"', {
'dependencies': [
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
'../third_party/npapi/npapi.gyp:npapi',
],
'include_dirs': [
'<(INTERMEDIATE_DIR)',
],
'sources': [
# All .cc, .h, .m, and .mm files under plugins except for tests and
# mocks.
'plugin/plugin_channel.cc',
'plugin/plugin_channel.h',
'plugin/plugin_interpose_util_mac.h',
'plugin/plugin_interpose_util_mac.mm',
'plugin/plugin_main.cc',
'plugin/plugin_main_mac.mm',
'plugin/plugin_thread.cc',
'plugin/plugin_thread.h',
'plugin/webplugin_accelerated_surface_proxy_mac.cc',
'plugin/webplugin_accelerated_surface_proxy_mac.h',
'plugin/webplugin_delegate_stub.cc',
'plugin/webplugin_delegate_stub.h',
'plugin/webplugin_proxy.cc',
'plugin/webplugin_proxy.h',
'public/plugin/content_plugin_client.h',
],
# These are layered in conditionals in the event other platforms
# end up using this module as well.
'conditions': [
['OS=="win"', {
'include_dirs': [
'<(DEPTH)/third_party/wtl/include',
],
}],
],
}],
],
}

@ -7,6 +7,7 @@
['enable_plugins==1', {
'dependencies': [
'../base/base.gyp:base',
'../gin/gin.gyp:gin',
'../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',

@ -21,6 +21,7 @@ source_set("ppapi_plugin_sources") {
visibility = [
":ppapi_plugin",
"//content", # For the component build.
"//gin",
]
sources = [
@ -36,7 +37,10 @@ source_set("ppapi_plugin_sources") {
"ppapi_thread.h",
]
configs += [ "//content:content_implementation" ]
configs += [
"//content:content_implementation",
"//v8:external_startup_data",
]
deps = [
"//base",

@ -1,6 +1,7 @@
include_rules = [
"+content/child",
"+content/public/plugin",
"+gin/public/isolate_holder.h",
"+gin/v8_initializer.h",
"+ppapi/c",
"+ppapi/proxy",
]

@ -20,7 +20,6 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/plugin/content_plugin_client.h"
#include "ipc/ipc_sender.h"
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/proxy_module.h"
@ -45,6 +44,10 @@
#include "content/public/common/sandbox_init.h"
#endif
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
#include "gin/v8_initializer.h"
#endif
#if defined(OS_POSIX) && !defined(OS_ANDROID)
#include <stdlib.h>
#endif
@ -123,10 +126,10 @@ int PpapiPluginMain(const MainFunctionParams& parameters) {
base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
kTraceEventPpapiProcessSortIndex);
// Allow the embedder to perform any necessary per-process initialization
// before the sandbox is initialized.
if (GetContentClient()->plugin())
GetContentClient()->plugin()->PreSandboxInitialization();
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
gin::V8Initializer::LoadV8Snapshot();
gin::V8Initializer::LoadV8Natives();
#endif
#if defined(OS_LINUX)
LinuxSandbox::InitializeSandbox();

@ -36,7 +36,6 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/sandbox_init.h"
#include "content/public/plugin/content_plugin_client.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_platform_file.h"
#include "ipc/ipc_sync_channel.h"
@ -550,13 +549,6 @@ bool PpapiThread::SetupRendererChannel(base::ProcessId renderer_pid,
void PpapiThread::SavePluginName(const base::FilePath& path) {
ppapi::proxy::PluginGlobals::Get()->set_plugin_name(
path.BaseName().AsUTF8Unsafe());
// plugin() is NULL when in-process, which is fine, because this is
// just a hook for setting the process name.
if (GetContentClient()->plugin()) {
GetContentClient()->plugin()->PluginProcessStarted(
path.BaseName().RemoveExtension().LossyDisplayName());
}
}
static std::string GetHistogramName(bool is_broker,

@ -37,7 +37,6 @@ public_app_shared_deps = [
"//content:export",
"//content/public/common:common_sources",
"//content/public/gpu:gpu_sources",
"//content/public/plugin:plugin_sources",
"//content/public/renderer:renderer_sources",
"//content/public/utility:utility_sources",
]

@ -1,7 +1,6 @@
include_rules = [
"+content/public/browser/content_browser_client.h",
"+content/public/gpu/content_gpu_client.h",
"+content/public/plugin/content_plugin_client.h",
"+content/public/renderer/content_renderer_client.h",
"+content/public/utility/content_utility_client.h",
]

@ -7,7 +7,6 @@
#include "build/build_config.h"
#include "content/public/gpu/content_gpu_client.h"
#include "content/public/plugin/content_plugin_client.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/utility/content_utility_client.h"
@ -71,14 +70,6 @@ ContentGpuClient* ContentMainDelegate::CreateContentGpuClient() {
#endif
}
ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
#if defined(CHROME_MULTIPLE_DLL_BROWSER)
return NULL;
#else
return new ContentPluginClient();
#endif
}
ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
#if defined(CHROME_MULTIPLE_DLL_BROWSER)
return NULL;

@ -17,7 +17,6 @@ namespace content {
class ContentBrowserClient;
class ContentGpuClient;
class ContentPluginClient;
class ContentRendererClient;
class ContentUtilityClient;
class ZygoteForkDelegate;
@ -90,7 +89,6 @@ class CONTENT_EXPORT ContentMainDelegate {
// override this.
virtual ContentBrowserClient* CreateContentBrowserClient();
virtual ContentGpuClient* CreateContentGpuClient();
virtual ContentPluginClient* CreateContentPluginClient();
virtual ContentRendererClient* CreateContentRendererClient();
virtual ContentUtilityClient* CreateContentUtilityClient();
};

@ -64,7 +64,6 @@ ContentUtilityClient* SetUtilityClientForTesting(ContentUtilityClient* u) {
ContentClient::ContentClient()
: browser_(NULL),
gpu_(NULL),
plugin_(NULL),
renderer_(NULL),
utility_(NULL) {}

@ -43,7 +43,6 @@ namespace content {
class ContentBrowserClient;
class ContentClient;
class ContentGpuClient;
class ContentPluginClient;
class ContentRendererClient;
class ContentUtilityClient;
struct PepperPluginInfo;
@ -74,7 +73,6 @@ class CONTENT_EXPORT ContentClient {
ContentBrowserClient* browser() { return browser_; }
ContentGpuClient* gpu() { return gpu_; }
ContentPluginClient* plugin() { return plugin_; }
ContentRendererClient* renderer() { return renderer_; }
ContentUtilityClient* utility() { return utility_; }
@ -168,8 +166,6 @@ class CONTENT_EXPORT ContentClient {
ContentBrowserClient* browser_;
// The embedder API for participating in gpu logic.
ContentGpuClient* gpu_;
// The embedder API for participating in plugin logic.
ContentPluginClient* plugin_;
// The embedder API for participating in renderer logic.
ContentRendererClient* renderer_;
// The embedder API for participating in utility logic.

@ -1,30 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# See //content/BUILD.gn for how this works.
group("plugin") {
if (is_component_build) {
public_deps = [
"//content",
]
} else {
public_deps = [
":plugin_sources",
]
}
}
source_set("plugin_sources") {
# External code should depend on via ":plugin" above.
visibility = [ "//content/*" ]
sources = [
"content_plugin_client.h",
]
deps = [
"//base",
"//content/public/common:common_sources",
]
}

@ -1,28 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_
#define CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_
#include "base/strings/string16.h"
#include "content/public/common/content_client.h"
namespace content {
// Embedder API for participating in plugin logic.
class CONTENT_EXPORT ContentPluginClient {
public:
virtual ~ContentPluginClient() {}
// Called to perform any per-process initialization necessary before
// the sandbox is initialized for the plugin process.
virtual void PreSandboxInitialization() {}
// Notifies that a plugin process has started.
virtual void PluginProcessStarted(const base::string16& plugin_name) {}
};
} // namespace content
#endif // CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_

@ -200,7 +200,6 @@ static_library("content_shell_lib") {
"//content/public/app:both",
"//content/public/browser",
"//content/public/common",
"//content/public/plugin",
"//content/public/renderer",
"//content/public/utility",
]

@ -56,7 +56,6 @@ source_set("test_support") {
"//content/gpu",
"//content/public/browser",
"//content/public/child",
"//content/public/plugin",
"//content/public/renderer",
"//content/public/utility",
"//content/renderer:for_content_tests",
@ -448,7 +447,6 @@ test("content_browsertests") {
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/plugin",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//content/shell:content_shell_lib",
@ -657,7 +655,6 @@ test("content_unittests") {
"//content/public/child",
"//content/public/common",
"//content/public/common:mojo_bindings",
"//content/public/plugin",
"//content/public/renderer",
"//content/renderer:for_content_tests",
"//crypto",