Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3846)

Unified Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1025303007: Remove PluginInstallerInfoBarDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/plugins/plugin_observer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_observer.cc
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
index 23ba08b05904217eebfef9961689f521d53a5524..e3808c6c44b44670f91cc391847278ef31e91925 100644
--- a/chrome/browser/plugins/plugin_observer.cc
+++ b/chrome/browser/plugins/plugin_observer.cc
@@ -338,10 +338,6 @@ bool PluginObserver::OnMessageReceived(
OnBlockedOutdatedPlugin)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_NPAPINotSupported,
OnNPAPINotSupported)
-#if defined(ENABLE_PLUGIN_INSTALLATION)
- IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FindMissingPlugin,
- OnFindMissingPlugin)
-#endif
IPC_MESSAGE_UNHANDLED(return false)
IPC_END_MESSAGE_MAP()
@@ -389,43 +385,6 @@ void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
}
#if defined(ENABLE_PLUGIN_INSTALLATION)
-void PluginObserver::OnFindMissingPlugin(int placeholder_id,
- const std::string& mime_type) {
- std::string lang = "en-US"; // Oh yes.
- scoped_ptr<PluginMetadata> plugin_metadata;
- PluginInstaller* installer = NULL;
- bool found_plugin = PluginFinder::GetInstance()->FindPlugin(
- mime_type, lang, &installer, &plugin_metadata);
- if (!found_plugin) {
- Send(new ChromeViewMsg_DidNotFindMissingPlugin(placeholder_id));
- return;
- }
- DCHECK(installer);
- DCHECK(plugin_metadata.get());
-
- plugin_placeholders_[placeholder_id] =
- new PluginPlaceholderHost(this, placeholder_id, plugin_metadata->name(),
- installer);
- PluginInstallerInfoBarDelegate::Create(
- InfoBarService::FromWebContents(web_contents()), installer,
- plugin_metadata.Pass(),
- base::Bind(&PluginObserver::InstallMissingPlugin,
- weak_ptr_factory_.GetWeakPtr(), installer));
-}
-
-void PluginObserver::InstallMissingPlugin(
- PluginInstaller* installer,
- const PluginMetadata* plugin_metadata) {
- if (plugin_metadata->url_for_display()) {
- installer->OpenDownloadURL(plugin_metadata->plugin_url(), web_contents());
- } else {
- TabModalConfirmDialog::Create(
- new ConfirmInstallDialogDelegate(
- web_contents(), installer, plugin_metadata->Clone()),
- web_contents());
- }
-}
-
void PluginObserver::OnRemovePluginPlaceholderHost(int placeholder_id) {
std::map<int, PluginPlaceholderHost*>::iterator it =
plugin_placeholders_.find(placeholder_id);
« no previous file with comments | « chrome/browser/plugins/plugin_observer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698