summaryrefslogtreecommitdiffstats
path: root/chrome/default_plugin
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 16:08:51 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 16:08:51 +0000
commit97e6c4c6081444371405bb39c99b016a65a309b8 (patch)
tree01d5b996990212964f7a91ca5315ff41134bd317 /chrome/default_plugin
parenta15fcb778a2c7d4c188ddbf44edcca8b6a526e16 (diff)
downloadchromium_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 'chrome/default_plugin')
-rw-r--r--chrome/default_plugin/plugin_impl_win.cc34
1 files changed, 4 insertions, 30 deletions
diff --git a/chrome/default_plugin/plugin_impl_win.cc b/chrome/default_plugin/plugin_impl_win.cc
index 8a2f3e3..cec0063 100644
--- a/chrome/default_plugin/plugin_impl_win.cc
+++ b/chrome/default_plugin/plugin_impl_win.cc
@@ -22,30 +22,6 @@
static const int TOOLTIP_MAX_WIDTH = 500;
-namespace {
-
-bool GetPluginFinderURL(std::string* plugin_finder_url) {
- if (!plugin_finder_url) {
- NOTREACHED();
- return false;
- }
-
- ChildThread::current()->Send(
- new PluginProcessHostMsg_GetPluginFinderUrl(plugin_finder_url));
- // If we get an empty string back this means the plugin finder has been
- // disabled.
- return true;
-}
-
-bool DownloadUrl(const std::string& url, HWND caller_window) {
- return ChildThread::current()->Send(
- new PluginProcessHostMsg_DownloadUrl(MSG_ROUTING_NONE, url,
- ::GetCurrentProcessId(),
- caller_window));
-}
-
-}
-
PluginInstallerImpl::PluginInstallerImpl(int16 mode)
: instance_(NULL),
mode_(mode),
@@ -94,11 +70,8 @@ bool PluginInstallerImpl::Initialize(HINSTANCE module_handle, NPP instance,
instance_ = instance;
mime_type_ = mime_type;
- if (!GetPluginFinderURL(&plugin_finder_url_)) {
- NOTREACHED() << __FUNCTION__ << " Failed to get the plugin finder URL";
- return false;
- }
-
+ ChildThread::current()->Send(
+ new PluginProcessHostMsg_GetPluginFinderUrl(&plugin_finder_url_));
if (plugin_finder_url_.empty())
disable_plugin_finder_ = true;
@@ -368,7 +341,8 @@ void PluginInstallerImpl::DownloadPlugin() {
DisplayStatus(IDS_DEFAULT_PLUGIN_DOWNLOADING_PLUGIN_MSG);
if (!plugin_download_url_for_display_) {
- DownloadUrl(plugin_download_url_, hwnd());
+ ChildThread::current()->Send(new PluginProcessHostMsg_DownloadUrl(
+ plugin_download_url_, ::GetCurrentProcessId(), hwnd()));
} else {
default_plugin::g_browser->geturl(instance(),
plugin_download_url_.c_str(),