diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 22:35:13 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 22:35:13 +0000 |
commit | 208d3b7d52b46f9a641d432433dc59894878880d (patch) | |
tree | db72721b64e095787c06631ba468f71b158e1649 /webkit | |
parent | 32d2669f5b705998451d1106f6072aaf7b38d30e (diff) | |
download | chromium_src-208d3b7d52b46f9a641d432433dc59894878880d.zip chromium_src-208d3b7d52b46f9a641d432433dc59894878880d.tar.gz chromium_src-208d3b7d52b46f9a641d432433dc59894878880d.tar.bz2 |
Moved the following IPC messages used by the chrome NPAPI plugin installer out of content
into Chrome.
1. PluginProcessHostMsg_GetPluginFinderUrl
2. PluginProcessHostMsg_MissingPluginStatus
3. PluginProcessHostMsg_DownloadUrl
These messages are prefixed with Chrome. Removed the InstallMissingPlugin and OnInstallMissingPlugin
handlers from the NPAPI plugin sources and from our webkit plugin implementation. The plugin infobar
no longer sends over an IPC message to initiate installation of the third party plugin. It sends over
a windows message which is handled in the plugin installer for Windows. This functionality is not
implemented for the mac and linux as before.
To display the plugin installation infobar the PluginProcessHostMsg_MissingPluginStatus message
sent by the plugin needs the routing id and the renderer process id. This information is now
passed along with the plugin instantiation parameters in NPP_New. These parameters are only read
by the default plugin.
This is a continuation of the fixes to ensure that IPC's don't span across content and chrome.
BUG=87335
Review URL: http://codereview.chromium.org/7812020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/npapi/plugin_host.cc | 22 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin.h | 5 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate.h | 3 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl.h | 1 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl_mac.mm | 4 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl_win.cc | 8 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.h | 2 |
9 files changed, 0 insertions, 53 deletions
diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc index ec5b6c7..e1ffaeb 100644 --- a/webkit/plugins/npapi/plugin_host.cc +++ b/webkit/plugins/npapi/plugin_host.cc @@ -781,28 +781,6 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { rv = NPERR_NO_ERROR; break; } - case webkit::npapi::default_plugin::kMissingPluginStatusStart + - webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE: - // fall through - case webkit::npapi::default_plugin::kMissingPluginStatusStart + - webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: { - // This is a hack for the default plugin to send notification to - // renderer. Even though we check if the plugin is the default plugin, - // we still need to worry about future standard change that may conflict - // with the variable definition, in order to avoid duplicate case clauses - // in this big switch statement. - scoped_refptr<PluginInstance> plugin(FindInstance(id)); - if (!plugin.get()) { - NOTREACHED(); - return NPERR_INVALID_INSTANCE_ERROR; - } - if (plugin->plugin_lib()->plugin_info().path.value() == - webkit::npapi::kDefaultPluginLibraryName) { - plugin->webplugin()->OnMissingPluginStatus(variable - - webkit::npapi::default_plugin::kMissingPluginStatusStart); - } - break; - } #if defined(OS_MACOSX) case NPNVpluginDrawingModel: { // return the drawing model that was negotiated when we initialized. diff --git a/webkit/plugins/npapi/webplugin.h b/webkit/plugins/npapi/webplugin.h index 10229b9..f9bbd14 100644 --- a/webkit/plugins/npapi/webplugin.h +++ b/webkit/plugins/npapi/webplugin.h @@ -111,11 +111,6 @@ class WebPlugin { virtual std::string GetCookies(const GURL& url, const GURL& first_party_for_cookies) = 0; - // When a default plugin has downloaded the plugin list and finds it is - // available, it calls this method to notify the renderer. Also it will update - // the status when user clicks on the plugin to install. - virtual void OnMissingPluginStatus(int status) = 0; - // Handles GetURL/GetURLNotify/PostURL/PostURLNotify requests initiated // by plugins. If the plugin wants notification of the result, notify_id will // be non-zero. diff --git a/webkit/plugins/npapi/webplugin_delegate.h b/webkit/plugins/npapi/webplugin_delegate.h index d2c9428..8ae84cf 100644 --- a/webkit/plugins/npapi/webplugin_delegate.h +++ b/webkit/plugins/npapi/webplugin_delegate.h @@ -118,9 +118,6 @@ class WebPluginDelegate { // Indicates a failure in data receipt. virtual void DidManualLoadFail() = 0; - // Only supported when the plugin is the default plugin. - virtual void InstallMissingPlugin() = 0; - // Creates a WebPluginResourceClient instance and returns the same. virtual WebPluginResourceClient* CreateResourceClient( unsigned long resource_id, diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h index 4942d3a..84c46b9 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl.h +++ b/webkit/plugins/npapi/webplugin_delegate_impl.h @@ -123,7 +123,6 @@ class WebPluginDelegateImpl : public WebPluginDelegate { virtual void DidReceiveManualData(const char* buffer, int length); virtual void DidFinishManualLoading(); virtual void DidManualLoadFail(); - virtual void InstallMissingPlugin(); virtual WebPluginResourceClient* CreateResourceClient( unsigned long resource_id, const GURL& url, int notify_id); virtual WebPluginResourceClient* CreateSeekableResourceClient( diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc index 7e2f584..422c95d 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc @@ -116,10 +116,6 @@ void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, WindowlessPaint(context, rect); } -void WebPluginDelegateImpl::InstallMissingPlugin() { - NOTIMPLEMENTED(); -} - bool WebPluginDelegateImpl::WindowedCreatePlugin() { DCHECK(!windowed_handle_); DCHECK(!plug_); diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm index a384e8a..bdd6eac 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm +++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm @@ -640,10 +640,6 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( return handled; } -void WebPluginDelegateImpl::InstallMissingPlugin() { - NOTIMPLEMENTED(); -} - #pragma mark - void WebPluginDelegateImpl::WindowlessUpdateGeometry( diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc index 80582b3..ce24dec 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc @@ -532,14 +532,6 @@ void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, } } -void WebPluginDelegateImpl::InstallMissingPlugin() { - NPEvent evt; - evt.event = default_plugin::kInstallMissingPluginMessage; - evt.lParam = 0; - evt.wParam = 0; - instance()->NPP_HandleEvent(&evt); -} - bool WebPluginDelegateImpl::WindowedCreatePlugin() { DCHECK(!windowed_handle_); diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc index 764a071..efabcb7 100644 --- a/webkit/plugins/npapi/webplugin_impl.cc +++ b/webkit/plugins/npapi/webplugin_impl.cc @@ -737,10 +737,6 @@ std::string WebPluginImpl::GetCookies(const GURL& url, return UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); } -void WebPluginImpl::OnMissingPluginStatus(int status) { - NOTREACHED(); -} - void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) { for (size_t i = 0; i < clients_.size(); ++i) { if (clients_[i].id == static_cast<unsigned long>(resource_id)) { diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h index 61b7852..bc612ad 100644 --- a/webkit/plugins/npapi/webplugin_impl.h +++ b/webkit/plugins/npapi/webplugin_impl.h @@ -111,8 +111,6 @@ class WebPluginImpl : public WebPlugin, const std::string& cookie); virtual std::string GetCookies(const GURL& url, const GURL& first_party_for_cookies); - virtual void OnMissingPluginStatus(int status); - virtual void URLRedirectResponse(bool allow, int resource_id); // Given a (maybe partial) url, completes using the base url. |