summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 21:42:52 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 21:42:52 +0000
commiteb9989097eb86b7cc6e535a1d69112b3a38a02c0 (patch)
treec9918e47c10ae09ca9d0f82928075624b10c9c2a /chrome/plugin
parent3e896efc285b9656fab36fa855d796b16634bd94 (diff)
downloadchromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.zip
chromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.tar.gz
chromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.tar.bz2
Switch to using one ResourceDispatcher per render process, and move it to ChildThread so that the same code is used by the plugin process (and soon, workers).
Review URL: http://codereview.chromium.org/42108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/chrome_plugin_host.cc3
-rw-r--r--chrome/plugin/plugin_thread.cc6
-rw-r--r--chrome/plugin/plugin_thread.h10
3 files changed, 2 insertions, 17 deletions
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index bc5357a..0401987 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -149,7 +149,8 @@ class PluginRequestHandlerProxy
GetCurrentProcessId(),
ResourceType::OBJECT,
false, // TODO (jcampan): mixed-content?
- cprequest_->context));
+ cprequest_->context,
+ MSG_ROUTING_CONTROL));
if (!bridge_.get())
return CPERR_FAILURE;
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 1590250..4524335 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -38,10 +38,6 @@ PluginThread* PluginThread::current() {
}
void PluginThread::OnControlMessageReceived(const IPC::Message& msg) {
- // Resource responses are sent to the resource dispatcher.
- if (resource_dispatcher_->OnMessageReceived(msg))
- return;
-
IPC_BEGIN_MESSAGE_MAP(PluginThread, msg)
IPC_MESSAGE_HANDLER(PluginProcessMsg_CreateChannel, OnCreateChannel)
IPC_MESSAGE_HANDLER(PluginProcessMsg_ShutdownResponse, OnShutdownResponse)
@@ -55,7 +51,6 @@ void PluginThread::Init() {
PatchNPNFunctions();
CoInitialize(NULL);
notification_service_.reset(new NotificationService);
- resource_dispatcher_ = new ResourceDispatcher(this);
// Preload the library to avoid loading, unloading then reloading
preloaded_plugin_module_ = NPAPI::PluginLib::LoadNativeLibrary(plugin_path_);
@@ -83,7 +78,6 @@ void PluginThread::CleanUp() {
NPAPI::PluginLib::UnloadAllPlugins();
ChromePluginLib::UnloadAllPlugins();
notification_service_.reset();
- resource_dispatcher_ = NULL;
CoUninitialize();
if (webkit_glue::ShouldForcefullyTerminatePluginProcess())
diff --git a/chrome/plugin/plugin_thread.h b/chrome/plugin/plugin_thread.h
index 1be1c7a..bcf926f 100644
--- a/chrome/plugin/plugin_thread.h
+++ b/chrome/plugin/plugin_thread.h
@@ -7,7 +7,6 @@
#include "base/file_path.h"
#include "chrome/common/child_thread.h"
-#include "chrome/common/resource_dispatcher.h"
#include "chrome/plugin/plugin_channel.h"
class NotificationService;
@@ -23,11 +22,6 @@ class PluginThread : public ChildThread {
// Returns the one plugin thread.
static PluginThread* current();
- // Returns the one true dispatcher.
- ResourceDispatcher* resource_dispatcher() {
- return resource_dispatcher_.get();
- }
-
private:
virtual void OnControlMessageReceived(const IPC::Message& msg);
@@ -42,10 +36,6 @@ class PluginThread : public ChildThread {
scoped_ptr<NotificationService> notification_service_;
- // Handles resource loads for this view.
- // NOTE: this object lives on the owner thread.
- scoped_refptr<ResourceDispatcher> resource_dispatcher_;
-
// The plugin module which is preloaded in Init
HMODULE preloaded_plugin_module_;