summaryrefslogtreecommitdiffstats
path: root/content/renderer/npapi
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-09-14 10:45:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-14 17:45:59 +0000
commit5708aae6ec926bddd69f3e9058f129d10a0d1873 (patch)
tree1d139378a2464f14c71419452eb7a2e53a718bba /content/renderer/npapi
parent4d53c25e7f09d990b52ef037b17d27690dd02614 (diff)
downloadchromium_src-5708aae6ec926bddd69f3e9058f129d10a0d1873.zip
chromium_src-5708aae6ec926bddd69f3e9058f129d10a0d1873.tar.gz
chromium_src-5708aae6ec926bddd69f3e9058f129d10a0d1873.tar.bz2
ipc: Use a global for the process's attachment broker.
This eliminates the need for a lot of plumbing, at the expense of yet another global. BUG=493414 Review URL: https://codereview.chromium.org/1292263003 Cr-Commit-Position: refs/heads/master@{#348649}
Diffstat (limited to 'content/renderer/npapi')
-rw-r--r--content/renderer/npapi/plugin_channel_host.cc12
-rw-r--r--content/renderer/npapi/plugin_channel_host.h10
-rw-r--r--content/renderer/npapi/webplugin_delegate_proxy.cc3
3 files changed, 7 insertions, 18 deletions
diff --git a/content/renderer/npapi/plugin_channel_host.cc b/content/renderer/npapi/plugin_channel_host.cc
index 86ea903..d552ff8 100644
--- a/content/renderer/npapi/plugin_channel_host.cc
+++ b/content/renderer/npapi/plugin_channel_host.cc
@@ -60,13 +60,11 @@ bool* PluginChannelHost::GetRemoveTrackingFlag() {
// static
PluginChannelHost* PluginChannelHost::GetPluginChannelHost(
const IPC::ChannelHandle& channel_handle,
- base::SingleThreadTaskRunner* ipc_task_runner,
- IPC::AttachmentBroker* broker) {
+ base::SingleThreadTaskRunner* ipc_task_runner) {
PluginChannelHost* result =
static_cast<PluginChannelHost*>(NPChannelBase::GetChannel(
channel_handle, IPC::Channel::MODE_CLIENT, ClassFactory,
- ipc_task_runner, true, ChildProcess::current()->GetShutDownEvent(),
- broker));
+ ipc_task_runner, true, ChildProcess::current()->GetShutDownEvent()));
return result;
}
@@ -78,10 +76,8 @@ PluginChannelHost::~PluginChannelHost() {
bool PluginChannelHost::Init(base::SingleThreadTaskRunner* ipc_task_runner,
bool create_pipe_now,
- base::WaitableEvent* shutdown_event,
- IPC::AttachmentBroker* broker) {
- return NPChannelBase::Init(ipc_task_runner, create_pipe_now, shutdown_event,
- broker);
+ base::WaitableEvent* shutdown_event) {
+ return NPChannelBase::Init(ipc_task_runner, create_pipe_now, shutdown_event);
}
int PluginChannelHost::GenerateRouteID() {
diff --git a/content/renderer/npapi/plugin_channel_host.h b/content/renderer/npapi/plugin_channel_host.h
index dd9dd1b..6c6f8e2 100644
--- a/content/renderer/npapi/plugin_channel_host.h
+++ b/content/renderer/npapi/plugin_channel_host.h
@@ -9,10 +9,6 @@
#include "content/child/npapi/np_channel_base.h"
#include "ipc/ipc_channel_handle.h"
-namespace IPC {
-class AttachmentBroker;
-}
-
namespace content {
class NPObjectBase;
@@ -27,13 +23,11 @@ class PluginChannelHost : public NPChannelBase {
#endif
static PluginChannelHost* GetPluginChannelHost(
const IPC::ChannelHandle& channel_handle,
- base::SingleThreadTaskRunner* ipc_task_runner,
- IPC::AttachmentBroker* broker);
+ base::SingleThreadTaskRunner* ipc_task_runner);
bool Init(base::SingleThreadTaskRunner* ipc_task_runner,
bool create_pipe_now,
- base::WaitableEvent* shutdown_event,
- IPC::AttachmentBroker* broker) override;
+ base::WaitableEvent* shutdown_event) override;
int GenerateRouteID() override;
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index 0f9768e..22d2799 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -322,8 +322,7 @@ bool WebPluginDelegateProxy::Initialize(
}
channel_host = PluginChannelHost::GetPluginChannelHost(
- channel_handle, ChildProcess::current()->io_task_runner(),
- RenderThreadImpl::current()->GetAttachmentBroker());
+ channel_handle, ChildProcess::current()->io_task_runner());
if (!channel_host.get()) {
LOG(ERROR) << "Couldn't get PluginChannelHost";
continue;