summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authordpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-30 17:33:21 +0000
committerdpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-30 17:33:21 +0000
commitba8a9e41120920c1ac340cad3bb71ae7ccb7aaba (patch)
tree1d042e7345d85d0dae754631842b01e44b51ab98 /content/ppapi_plugin
parentf6519b09512464fe356051a39f8a43e2d581d818 (diff)
downloadchromium_src-ba8a9e41120920c1ac340cad3bb71ae7ccb7aaba.zip
chromium_src-ba8a9e41120920c1ac340cad3bb71ae7ccb7aaba.tar.gz
chromium_src-ba8a9e41120920c1ac340cad3bb71ae7ccb7aaba.tar.bz2
Revert 91150 - Define PPB_Flash_TCPSocket and PPB_Flash_SSLSocket.
TEST=None BUG=None Review URL: http://codereview.chromium.org/7191005 TBR=yzshen@chromium.org Review URL: http://codereview.chromium.org/7293001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc44
-rw-r--r--content/ppapi_plugin/ppapi_thread.h10
2 files changed, 1 insertions, 53 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index c3b42ed..9b3c846 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -41,8 +41,7 @@ PpapiThread::PpapiThread(bool is_broker)
get_plugin_interface_(NULL),
connect_instance_func_(NULL),
local_pp_module_(
- base::RandInt(0, std::numeric_limits<PP_Module>::max())),
- next_plugin_dispatcher_id_(1) {
+ base::RandInt(0, std::numeric_limits<PP_Module>::max())) {
}
PpapiThread::~PpapiThread() {
@@ -71,12 +70,6 @@ bool PpapiThread::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg)
IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin)
IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel)
- IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ConnectACK,
- OnPluginDispatcherMessageReceived(msg))
- IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ReadACK,
- OnPluginDispatcherMessageReceived(msg))
- IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_WriteACK,
- OnPluginDispatcherMessageReceived(msg))
IPC_END_MESSAGE_MAP()
return true;
}
@@ -110,27 +103,6 @@ bool PpapiThread::SendToBrowser(IPC::Message* msg) {
return Send(msg);
}
-uint32 PpapiThread::Register(pp::proxy::PluginDispatcher* plugin_dispatcher) {
- if (!plugin_dispatcher ||
- plugin_dispatchers_.size() >= std::numeric_limits<uint32>::max()) {
- return 0;
- }
-
- uint32 id = 0;
- do {
- // Although it is unlikely, make sure that we won't cause any trouble when
- // the counter overflows.
- id = next_plugin_dispatcher_id_++;
- } while (id == 0 ||
- plugin_dispatchers_.find(id) != plugin_dispatchers_.end());
- plugin_dispatchers_[id] = plugin_dispatcher;
- return id;
-}
-
-void PpapiThread::Unregister(uint32 plugin_dispatcher_id) {
- plugin_dispatchers_.erase(plugin_dispatcher_id);
-}
-
void PpapiThread::OnMsgLoadPlugin(const FilePath& path) {
base::ScopedNativeLibrary library(base::LoadNativeLibrary(path, NULL));
@@ -220,20 +192,6 @@ void PpapiThread::OnMsgCreateChannel(base::ProcessHandle host_process_handle,
Send(new PpapiHostMsg_ChannelCreated(channel_handle));
}
-void PpapiThread::OnPluginDispatcherMessageReceived(const IPC::Message& msg) {
- // The first parameter should be a plugin dispatcher ID.
- void* iter = NULL;
- uint32 id = 0;
- if (!msg.ReadUInt32(&iter, &id)) {
- NOTREACHED();
- return;
- }
- std::map<uint32, pp::proxy::PluginDispatcher*>::iterator dispatcher =
- plugin_dispatchers_.find(id);
- if (dispatcher != plugin_dispatchers_.end())
- dispatcher->second->OnMessageReceived(msg);
-}
-
bool PpapiThread::SetupRendererChannel(base::ProcessHandle host_process_handle,
int renderer_id,
IPC::ChannelHandle* handle) {
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index 5b77f24..3d20387 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -6,8 +6,6 @@
#define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
#pragma once
-#include <map>
-
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -44,15 +42,11 @@ class PpapiThread : public ChildThread,
virtual void PostToWebKitThread(const tracked_objects::Location& from_here,
const base::Closure& task) OVERRIDE;
virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE;
- virtual uint32 Register(
- pp::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE;
- virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE;
// Message handlers.
void OnMsgLoadPlugin(const FilePath& path);
void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
int renderer_id);
- void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
// Sets up the channel to the given renderer. On success, returns true and
// fills the given ChannelHandle with the information from the new channel.
@@ -87,10 +81,6 @@ class PpapiThread : public ChildThread,
scoped_ptr<PpapiWebKitThread> webkit_thread_;
- // The PluginDispatcher instances contained in the map are not owned by it.
- std::map<uint32, pp::proxy::PluginDispatcher*> plugin_dispatchers_;
- uint32 next_plugin_dispatcher_id_;
-
DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
};