diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 18:42:45 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 18:42:45 +0000 |
commit | d952a0583a393551b3f08fb77bd8cd49dde6c446 (patch) | |
tree | 43ebbc47aac7dbb2c6105eed44937c51b93756bc /chrome/browser/plugin_observer.cc | |
parent | 32c438e297c499e8444c0b5c19e2c4fa155375ff (diff) | |
download | chromium_src-d952a0583a393551b3f08fb77bd8cd49dde6c446.zip chromium_src-d952a0583a393551b3f08fb77bd8cd49dde6c446.tar.gz chromium_src-d952a0583a393551b3f08fb77bd8cd49dde6c446.tar.bz2 |
Moved the following IPCs out of chrome into content where they are handled by
TabContents/RVH which eventually forward the notifications out to the TabContentsDelegate.
1. ViewHostMsg_CrashedPlugin
2. ViewHostMsg_DidStartProvisionalLoadForFrame
3. ViewHostMsg_UpdateTargetURL
The ViewHostMsg_DidStartProvisionalLoadForFrame IPC is still handled by the PrerenderRenderViewHostObserver
object in chrome. Will move that out in a future CL.
BUG=87335
Review URL: http://codereview.chromium.org/7835004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_observer.cc')
-rw-r--r-- | chrome/browser/plugin_observer.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc index 44d414e..2364a52 100644 --- a/chrome/browser/plugin_observer.cc +++ b/chrome/browser/plugin_observer.cc @@ -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 @@ PluginObserver::~PluginObserver() { 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 @@ bool PluginObserver::OnMessageReceived(const IPC::Message& message) { 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() ? |