diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:35:26 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:35:26 +0000 |
commit | 4a560eddc550fbe5761aceb1461ff91e9097a3d3 (patch) | |
tree | 697764961b53187398a7e9dbb7f5791d4dd270bc | |
parent | d2442374dd7607a8d140f4e29fd3b80a3309c615 (diff) | |
download | chromium_src-4a560eddc550fbe5761aceb1461ff91e9097a3d3.zip chromium_src-4a560eddc550fbe5761aceb1461ff91e9097a3d3.tar.gz chromium_src-4a560eddc550fbe5761aceb1461ff91e9097a3d3.tar.bz2 |
posix: show "plugin crashed" info bar when appropriate
Note I fixed a bug in AlertInfoBar while I was at it.
Review URL: http://codereview.chromium.org/155462
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20567 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/infobar_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/gtk/infobar_gtk.cc b/chrome/browser/gtk/infobar_gtk.cc index 338012d..31e86a5 100644 --- a/chrome/browser/gtk/infobar_gtk.cc +++ b/chrome/browser/gtk/infobar_gtk.cc @@ -161,6 +161,8 @@ class AlertInfoBar : public InfoBar { GtkWidget* label = gtk_label_new(WideToUTF8(text).c_str()); gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &gfx::kGdkBlack); gtk_box_pack_start(GTK_BOX(hbox_), label, FALSE, FALSE, 0); + + gtk_widget_show_all(border_bin_.get()); } }; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index bcbb09b..21ccbe1 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1530,11 +1530,10 @@ void TabContents::OnMissingPluginStatus(int status) { } void TabContents::OnCrashedPlugin(const FilePath& plugin_path) { -#if defined(OS_WIN) -// TODO(PORT): pull in when plug-ins work DCHECK(!plugin_path.value().empty()); std::wstring plugin_name = plugin_path.ToWStringHack(); +#if defined(OS_WIN) scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfo(plugin_path)); if (version_info.get()) { @@ -1542,10 +1541,12 @@ void TabContents::OnCrashedPlugin(const FilePath& plugin_path) { if (!product_name.empty()) plugin_name = product_name; } +#else + NOTIMPLEMENTED() << " convert plugin path to plugin name"; +#endif AddInfoBar(new SimpleAlertInfoBarDelegate( this, l10n_util::GetStringF(IDS_PLUGIN_CRASHED_PROMPT, plugin_name), NULL)); -#endif } void TabContents::OnCrashedWorker() { |