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

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

Issue 1364913005: Update some more infobars to use vector icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 5 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 | « no previous file | chrome/browser/ssl/ssl_add_certificate.cc » ('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 21b5df704f9273a957ba24b0da44724ca83994b6..1e68f6b093797bd2e074a36213e2861cabfaace5 100644
--- a/chrome/browser/plugins/plugin_observer.cc
+++ b/chrome/browser/plugins/plugin_observer.cc
@@ -34,6 +34,7 @@
#include "content/public/common/webplugininfo.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/gfx/vector_icons_public.h"
#if defined(ENABLE_PLUGIN_INSTALLATION)
#if defined(OS_WIN)
@@ -136,6 +137,7 @@ class ReloadPluginInfoBarDelegate : public ConfirmInfoBarDelegate {
// ConfirmInfobarDelegate:
int GetIconId() const override;
+ gfx::VectorIconId GetVectorIconId() const override;
base::string16 GetMessageText() const override;
int GetButtons() const override;
base::string16 GetButtonLabel(InfoBarButton button) const override;
@@ -167,6 +169,14 @@ int ReloadPluginInfoBarDelegate::GetIconId() const {
return IDR_INFOBAR_PLUGIN_CRASHED;
}
+gfx::VectorIconId ReloadPluginInfoBarDelegate::GetVectorIconId() const {
+#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
+ return gfx::VectorIconId::EXTENSION_CRASHED;
+#else
+ return gfx::VectorIconId::VECTOR_ICON_NONE;
+#endif
+}
+
base::string16 ReloadPluginInfoBarDelegate::GetMessageText() const {
return message_;
}
@@ -407,6 +417,11 @@ void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) {
SimpleAlertInfoBarDelegate::Create(
InfoBarService::FromWebContents(web_contents()),
IDR_INFOBAR_PLUGIN_CRASHED,
+#if !defined(OS_MACOSX)
+ gfx::VectorIconId::EXTENSION_CRASHED,
+#else
+ gfx::VectorIconId::VECTOR_ICON_NONE,
+#endif
l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT,
plugin_name),
true);
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_add_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698