diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 22:27:24 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 22:27:24 +0000 |
commit | 616ed5a653d4bc13b4633d7c7b85d2f0c73bfd72 (patch) | |
tree | 04b8cd92d18cd6e1ff54e46c6c32b0d70391a831 /chrome/browser/web_contents.cc | |
parent | c7eeed7fa25e06ec3d0367a74d2b43671958c5d3 (diff) | |
download | chromium_src-616ed5a653d4bc13b4633d7c7b85d2f0c73bfd72.zip chromium_src-616ed5a653d4bc13b4633d7c7b85d2f0c73bfd72.tar.gz chromium_src-616ed5a653d4bc13b4633d7c7b85d2f0c73bfd72.tar.bz2 |
Beginnings of a new InfoBar system.
This implements AlertInfoBar and InfoBarContainer. It also makes the crashed plugin/js oom infobars use this new system.
Design Doc: http://dev.chromium.org/developers/design-documents/info-barshttp://crbug.com/4620
Review URL: http://codereview.chromium.org/11318
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.cc')
-rw-r--r-- | chrome/browser/web_contents.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index a8fe7db..60ba95b4 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -1338,13 +1338,13 @@ void WebContents::OnCrashedPlugin(const std::wstring& plugin_path) { if (!product_name.empty()) plugin_name = product_name; } - view_->DisplayErrorInInfoBar( - l10n_util::GetStringF(IDS_PLUGIN_CRASHED_PROMPT, plugin_name)); + AddInfoBar(new SimpleAlertInfoBarDelegate( + l10n_util::GetStringF(IDS_PLUGIN_CRASHED_PROMPT, plugin_name), NULL)); } void WebContents::OnJSOutOfMemory() { - view_->DisplayErrorInInfoBar( - l10n_util::GetString(IDS_JS_OUT_OF_MEMORY_PROMPT)); + AddInfoBar(new SimpleAlertInfoBarDelegate( + l10n_util::GetString(IDS_JS_OUT_OF_MEMORY_PROMPT), NULL)); } bool WebContents::CanBlur() const { @@ -1477,7 +1477,7 @@ void WebContents::Observe(NotificationType type, break; } default: { - NOTREACHED(); + TabContents::Observe(type, source, details); break; } } |