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

Unified Diff: chrome/browser/plugin_observer.cc

Issue 7835004: Moved the following IPCs out of chrome into content where they are handled by (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/plugin_observer.h ('k') | chrome/browser/prerender/prerender_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_observer.cc
===================================================================
--- chrome/browser/plugin_observer.cc (revision 99765)
+++ chrome/browser/plugin_observer.cc (working copy)
@@ -10,7 +10,6 @@
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
-#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
@@ -293,7 +292,6 @@
bool PluginObserver::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PluginObserver, message)
- IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedOutdatedPlugin,
OnBlockedOutdatedPlugin)
IPC_MESSAGE_UNHANDLED(return false)
@@ -302,33 +300,6 @@
return true;
}
-void PluginObserver::OnCrashedPlugin(const FilePath& plugin_path) {
- DCHECK(!plugin_path.value().empty());
-
- string16 plugin_name = plugin_path.LossyDisplayName();
- webkit::WebPluginInfo plugin_info;
- if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
- plugin_path, &plugin_info) &&
- !plugin_info.name.empty()) {
- plugin_name = plugin_info.name;
-#if defined(OS_MACOSX)
- // Many plugins on the Mac have .plugin in the actual name, which looks
- // terrible, so look for that and strip it off if present.
- const std::string kPluginExtension = ".plugin";
- if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true))
- plugin_name.erase(plugin_name.length() - kPluginExtension.length());
-#endif // OS_MACOSX
- }
- gfx::Image* icon = &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_INFOBAR_PLUGIN_CRASHED);
- tab_contents_->infobar_tab_helper()->AddInfoBar(
- new SimpleAlertInfoBarDelegate(
- tab_contents(),
- icon,
- l10n_util::GetStringFUTF16(IDS_PLUGIN_CRASHED_PROMPT, plugin_name),
- true));
-}
-
void PluginObserver::OnBlockedOutdatedPlugin(const string16& name,
const GURL& update_url) {
tab_contents_->infobar_tab_helper()->AddInfoBar(update_url.is_empty() ?
« no previous file with comments | « chrome/browser/plugin_observer.h ('k') | chrome/browser/prerender/prerender_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698