diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 16:08:51 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 16:08:51 +0000 |
commit | 97e6c4c6081444371405bb39c99b016a65a309b8 (patch) | |
tree | 01d5b996990212964f7a91ca5315ff41134bd317 /content/browser/plugin_process_host.cc | |
parent | a15fcb778a2c7d4c188ddbf44edcca8b6a526e16 (diff) | |
download | chromium_src-97e6c4c6081444371405bb39c99b016a65a309b8.zip chromium_src-97e6c4c6081444371405bb39c99b016a65a309b8.tar.gz chromium_src-97e6c4c6081444371405bb39c99b016a65a309b8.tar.bz2 |
Get rid of chrome dependencies from PluginProcessHost by moving dispatching of chrome specific messages to a chrome IPC filter.
Review URL: http://codereview.chromium.org/7036025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_process_host.cc')
-rw-r--r-- | content/browser/plugin_process_host.cc | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index a543200..2e72f31 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -19,26 +19,18 @@ #include "base/path_service.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/net/resolve_proxy_msg_helper.h" -#include "chrome/browser/net/url_request_tracking.h" -#include "chrome/browser/plugin_download_helper.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/logging_chrome.h" -#include "chrome/common/render_messages.h" #include "content/browser/browser_thread.h" +#include "content/browser/content_browser_client.h" +#include "content/browser/resolve_proxy_msg_helper.h" #include "content/browser/plugin_service.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_message_filter.h" #include "content/common/plugin_messages.h" #include "content/common/resource_messages.h" #include "ipc/ipc_switches.h" -#include "net/base/io_buffer.h" -#include "net/url_request/url_request.h" -#include "net/url_request/url_request_context.h" -#include "net/url_request/url_request_context_getter.h" #include "ui/base/ui_base_switches.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/gl/gl_switches.h" @@ -53,9 +45,6 @@ #include "ui/gfx/rect.h" #endif -static const char kDefaultPluginFinderURL[] = - "https://dl-ssl.google.com/edgedl/chrome/plugins/plugins2.xml"; - #if defined(OS_WIN) void PluginProcessHost::OnPluginWindowDestroyed(HWND window, HWND parent) { // The window is destroyed at this point, we just care about its parent, which @@ -69,15 +58,6 @@ void PluginProcessHost::OnPluginWindowDestroyed(HWND window, HWND parent) { PostMessage(parent, WM_CLOSE, 0, 0); } -void PluginProcessHost::OnDownloadUrl(const std::string& url, - int source_pid, - gfx::NativeWindow caller_window) { - PluginDownloadUrlHelper* download_url_helper = - new PluginDownloadUrlHelper(url, source_pid, caller_window, NULL); - download_url_helper->InitiateDownload( - Profile::GetDefaultRequestContext()->GetURLRequestContext()); -} - void PluginProcessHost::AddWindow(HWND window) { plugin_parent_windows_set_.insert(window); } @@ -241,6 +221,7 @@ bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info, #endif cmd_line); + content::GetContentClient()->browser()->PluginProcessHostCreated(this); AddFilter(new ResolveProxyMsgHelper(NULL)); return true; @@ -256,12 +237,9 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(PluginProcessHost, msg) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ChannelCreated, OnChannelCreated) - IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetPluginFinderUrl, - OnGetPluginFinderUrl) #if defined(OS_WIN) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginWindowDestroyed, OnPluginWindowDestroyed) - IPC_MESSAGE_HANDLER(PluginProcessHostMsg_DownloadUrl, OnDownloadUrl) #endif #if defined(TOOLKIT_USES_GTK) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId, @@ -350,19 +328,3 @@ void PluginProcessHost::OnChannelCreated( client->OnChannelOpened(channel_handle); sent_requests_.pop(); } - -void PluginProcessHost::OnGetPluginFinderUrl(std::string* plugin_finder_url) { - // TODO(bauerb): Move this method to MessageFilter. - if (!plugin_finder_url) { - NOTREACHED(); - return; - } - - if (!g_browser_process->plugin_finder_disabled()) { - // TODO(iyengar): Add the plumbing to retrieve the default - // plugin finder URL. - *plugin_finder_url = kDefaultPluginFinderURL; - } else { - plugin_finder_url->clear(); - } -} |