summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/plugins
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 13:20:36 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 13:20:36 +0000
commit1a86f75dffd931514c1db92725c47e727682de5a (patch)
tree5e200670869a2825567c645fa865422c2193287c /chrome/renderer/plugins
parentac2d85013a3f8908cefc12fca0dcb40a526e6c39 (diff)
downloadchromium_src-1a86f75dffd931514c1db92725c47e727682de5a.zip
chromium_src-1a86f75dffd931514c1db92725c47e727682de5a.tar.gz
chromium_src-1a86f75dffd931514c1db92725c47e727682de5a.tar.bz2
Use regular download mechanism to download and open plug-in installer files.
As downloads can now be cancelled as well, add a DownloadCancelled callback to PluginInstallerObserver, and rename the others to be consistent in naming. BUG=110484 TEST=none Review URL: http://codereview.chromium.org/9370018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/plugins')
-rw-r--r--chrome/renderer/plugins/plugin_placeholder.cc8
-rw-r--r--chrome/renderer/plugins/plugin_placeholder.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc
index f49fc72..5d2d269 100644
--- a/chrome/renderer/plugins/plugin_placeholder.cc
+++ b/chrome/renderer/plugins/plugin_placeholder.cc
@@ -206,6 +206,8 @@ bool PluginPlaceholder::OnMessageReceived(const IPC::Message& message) {
OnFinishedDownloadingPlugin)
IPC_MESSAGE_HANDLER(ChromeViewMsg_ErrorDownloadingPlugin,
OnErrorDownloadingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_CancelledDownloadingPlugin,
+ OnCancelledDownloadingPlugin)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -318,7 +320,11 @@ void PluginPlaceholder::OnFinishedDownloadingPlugin() {
void PluginPlaceholder::OnErrorDownloadingPlugin(const std::string& error) {
SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_ERROR,
- UTF8ToUTF16(error)));
+ UTF8ToUTF16(error)));
+}
+
+void PluginPlaceholder::OnCancelledDownloadingPlugin() {
+ SetMessage(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED));
}
#endif // defined(ENABLE_PLUGIN_INSTALLATION)
diff --git a/chrome/renderer/plugins/plugin_placeholder.h b/chrome/renderer/plugins/plugin_placeholder.h
index 3034c6b..c70de24 100644
--- a/chrome/renderer/plugins/plugin_placeholder.h
+++ b/chrome/renderer/plugins/plugin_placeholder.h
@@ -116,6 +116,7 @@ class PluginPlaceholder : public content::RenderViewObserver,
void OnStartedDownloadingPlugin();
void OnFinishedDownloadingPlugin();
void OnErrorDownloadingPlugin(const std::string& error);
+ void OnCancelledDownloadingPlugin();
#endif
void SetMessage(const string16& message);