diff options
author | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 00:40:50 +0000 |
---|---|---|
committer | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 00:40:50 +0000 |
commit | 099587b7a8bf441af62251275197973203e2f11a (patch) | |
tree | a8e0711b152925dbc2102b692d6ceec19e881fa3 /content/renderer | |
parent | 79311e89bc4fbd952d5ce872011f8360bfa5e6e6 (diff) | |
download | chromium_src-099587b7a8bf441af62251275197973203e2f11a.zip chromium_src-099587b7a8bf441af62251275197973203e2f11a.tar.gz chromium_src-099587b7a8bf441af62251275197973203e2f11a.tar.bz2 |
Move NPObjectBase and PluginChannelBase from content/plugin to content/common
Also rename PluginChannelBase to NPChannelBase, fix variable naming to be agnostic of plugins, and fix a comment in NPChannelBase.
This change is refactoring only and introduces no change in behaviour.
BUG=96703
Review URL: http://codereview.chromium.org/7891003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/plugin_channel_host.cc | 14 | ||||
-rw-r--r-- | content/renderer/plugin_channel_host.h | 10 | ||||
-rw-r--r-- | content/renderer/render_thread.cc | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/content/renderer/plugin_channel_host.cc b/content/renderer/plugin_channel_host.cc index 7fedc84..b41db85 100644 --- a/content/renderer/plugin_channel_host.cc +++ b/content/renderer/plugin_channel_host.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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 "content/renderer/plugin_channel_host.h" +#include "content/common/npobject_base.h" #include "content/common/plugin_messages.h" -#include "content/plugin/npobject_base.h" #if defined(OS_POSIX) #include "ipc/ipc_channel_posix.h" @@ -71,7 +71,7 @@ PluginChannelHost* PluginChannelHost::GetPluginChannelHost( const IPC::ChannelHandle& channel_handle, base::MessageLoopProxy* ipc_message_loop) { PluginChannelHost* result = - static_cast<PluginChannelHost*>(PluginChannelBase::GetChannel( + static_cast<PluginChannelHost*>(NPChannelBase::GetChannel( channel_handle, IPC::Channel::MODE_CLIENT, ClassFactory, @@ -88,7 +88,7 @@ PluginChannelHost::~PluginChannelHost() { bool PluginChannelHost::Init(base::MessageLoopProxy* ipc_message_loop, bool create_pipe_now) { - bool ret = PluginChannelBase::Init(ipc_message_loop, create_pipe_now); + bool ret = NPChannelBase::Init(ipc_message_loop, create_pipe_now); is_listening_filter_ = new IsListeningFilter; channel_->AddFilter(is_listening_filter_); return ret; @@ -104,7 +104,7 @@ int PluginChannelHost::GenerateRouteID() { void PluginChannelHost::AddRoute(int route_id, IPC::Channel::Listener* listener, NPObjectBase* npobject) { - PluginChannelBase::AddRoute(route_id, listener, npobject); + NPChannelBase::AddRoute(route_id, listener, npobject); if (!npobject) proxies_[route_id] = listener; @@ -112,7 +112,7 @@ void PluginChannelHost::AddRoute(int route_id, void PluginChannelHost::RemoveRoute(int route_id) { proxies_.erase(route_id); - PluginChannelBase::RemoveRoute(route_id); + NPChannelBase::RemoveRoute(route_id); } bool PluginChannelHost::OnControlMessageReceived(const IPC::Message& message) { @@ -135,7 +135,7 @@ void PluginChannelHost::OnPluginShuttingDown(const IPC::Message& message) { } void PluginChannelHost::OnChannelError() { - PluginChannelBase::OnChannelError(); + NPChannelBase::OnChannelError(); for (ProxyMap::iterator iter = proxies_.begin(); iter != proxies_.end(); iter++) { diff --git a/content/renderer/plugin_channel_host.h b/content/renderer/plugin_channel_host.h index 524df47..a12fca6 100644 --- a/content/renderer/plugin_channel_host.h +++ b/content/renderer/plugin_channel_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -7,7 +7,7 @@ #pragma once #include "base/hash_tables.h" -#include "content/plugin/plugin_channel_base.h" +#include "content/common/np_channel_base.h" #include "ipc/ipc_channel_handle.h" class IsListeningFilter; @@ -15,7 +15,7 @@ class NPObjectBase; // Encapsulates an IPC channel between the renderer and one plugin process. // On the plugin side there's a corresponding PluginChannel. -class PluginChannelHost : public PluginChannelBase { +class PluginChannelHost : public NPChannelBase { public: static PluginChannelHost* GetPluginChannelHost( const IPC::ChannelHandle& channel_handle, @@ -38,7 +38,7 @@ class PluginChannelHost : public PluginChannelBase { static bool IsListening(); static void Broadcast(IPC::Message* message) { - PluginChannelBase::Broadcast(message); + NPChannelBase::Broadcast(message); } bool expecting_shutdown() { return expecting_shutdown_; } @@ -48,7 +48,7 @@ class PluginChannelHost : public PluginChannelBase { PluginChannelHost(); virtual ~PluginChannelHost(); - static PluginChannelBase* ClassFactory() { return new PluginChannelHost(); } + static NPChannelBase* ClassFactory() { return new PluginChannelHost(); } virtual bool OnControlMessageReceived(const IPC::Message& message); void OnSetException(const std::string& message); diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc index 3be07a4..3e11f98 100644 --- a/content/renderer/render_thread.cc +++ b/content/renderer/render_thread.cc @@ -74,7 +74,7 @@ #include "content/plugin/plugin_channel.h" #else #include "base/memory/scoped_handle.h" -#include "content/plugin/plugin_channel_base.h" +#include "content/common/np_channel_base.h" #endif #if defined(OS_WIN) @@ -245,7 +245,7 @@ RenderThread::~RenderThread() { // TODO(port) #if defined(OS_WIN) // Clean up plugin channels before this thread goes away. - PluginChannelBase::CleanupChannels(); + NPChannelBase::CleanupChannels(); // Don't call COM if the renderer is in the sandbox. if (RenderProcessImpl::InProcessPlugins()) CoUninitialize(); |