summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 03:51:40 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 03:51:40 +0000
commit0eb0e874e21ae0ce8bcf0764b5168910d6dfae9b (patch)
tree147133235b836cff5cdf9605e611b172348fc6db /content/ppapi_plugin
parentea028cbab07818f1d058fd7045e775220b2f7cbb (diff)
downloadchromium_src-0eb0e874e21ae0ce8bcf0764b5168910d6dfae9b.zip
chromium_src-0eb0e874e21ae0ce8bcf0764b5168910d6dfae9b.tar.gz
chromium_src-0eb0e874e21ae0ce8bcf0764b5168910d6dfae9b.tar.bz2
Pepper: Remove DispatcherMessageListener
Now all resources that require communication between browser and plugin have been moved to the new design. This is not needed anymore. BUG=None TEST=None Review URL: https://codereview.chromium.org/111893003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc33
-rw-r--r--content/ppapi_plugin/ppapi_thread.h19
2 files changed, 1 insertions, 51 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index a29a639..f0db156 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -37,7 +37,6 @@
#include "ppapi/proxy/interface_list.h"
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/shared_impl/api_id.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "ui/base/ui_base_switches.h"
@@ -60,37 +59,12 @@ namespace content {
typedef int32_t (*InitializeBrokerFunc)
(PP_ConnectInstance_Func* connect_instance_func);
-PpapiThread::DispatcherMessageListener::DispatcherMessageListener(
- PpapiThread* owner) : owner_(owner) {
-}
-
-PpapiThread::DispatcherMessageListener::~DispatcherMessageListener() {
-}
-
-bool PpapiThread::DispatcherMessageListener::OnMessageReceived(
- const IPC::Message& msg) {
- // The first parameter should be a plugin dispatcher ID.
- PickleIterator iter(msg);
- uint32 id = 0;
- if (!msg.ReadUInt32(&iter, &id)) {
- NOTREACHED();
- return false;
- }
- std::map<uint32, ppapi::proxy::PluginDispatcher*>::iterator dispatcher =
- owner_->plugin_dispatchers_.find(id);
- if (dispatcher != owner_->plugin_dispatchers_.end())
- return dispatcher->second->OnMessageReceived(msg);
-
- return false;
-}
-
PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker)
: is_broker_(is_broker),
connect_instance_func_(NULL),
local_pp_module_(
base::RandInt(0, std::numeric_limits<PP_Module>::max())),
- next_plugin_dispatcher_id_(1),
- dispatcher_message_listener_(this) {
+ next_plugin_dispatcher_id_(1) {
ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get();
globals->set_plugin_proxy_delegate(this);
globals->set_command_line(
@@ -98,11 +72,6 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker)
webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
blink::initialize(webkit_platform_support_.get());
-
- // Register interfaces that expect messages from the browser process. Please
- // note that only those InterfaceProxy-based ones require registration.
- AddRoute(ppapi::API_ID_PPB_HOSTRESOLVER_PRIVATE,
- &dispatcher_message_listener_);
}
PpapiThread::~PpapiThread() {
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index d1ca550..8a06c4d 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -16,7 +16,6 @@
#include "build/build_config.h"
#include "content/child/child_thread.h"
#include "content/public/common/pepper_plugin_info.h"
-#include "ipc/ipc_listener.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/trusted/ppp_broker.h"
#include "ppapi/proxy/connection.h"
@@ -62,22 +61,6 @@ class PpapiThread : public ChildThread,
LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION.
};
- // This class finds the target PluginDispatcher for each message it receives
- // and forwards the message.
- class DispatcherMessageListener : public IPC::Listener {
- public:
- explicit DispatcherMessageListener(PpapiThread* owner);
- virtual ~DispatcherMessageListener();
-
- // IPC::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
-
- private:
- PpapiThread* owner_;
-
- DISALLOW_COPY_AND_ASSIGN(DispatcherMessageListener);
- };
-
// ChildThread overrides.
virtual bool Send(IPC::Message* msg) OVERRIDE;
virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE;
@@ -173,8 +156,6 @@ class PpapiThread : public ChildThread,
base::win::ScopedHandle peer_handle_;
#endif
- DispatcherMessageListener dispatcher_message_listener_;
-
DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
};