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

Unified Diff: chrome/browser/ui/global_error/global_error.cc

Issue 1289413003: Switch global error menu icon to vectorized MD asset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kick signin error service on 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
Index: chrome/browser/ui/global_error/global_error.cc
diff --git a/chrome/browser/ui/global_error/global_error.cc b/chrome/browser/ui/global_error/global_error.cc
index 4390baa7e991457a7d9a2a5ab2f146ebbd4fa2b6..7f464027dd8ad53f2b543108dc9be85d083407e7 100644
--- a/chrome/browser/ui/global_error/global_error.cc
+++ b/chrome/browser/ui/global_error/global_error.cc
@@ -10,6 +10,13 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/gfx/vector_icons_public.h"
+#include "ui/native_theme/common_theme.h"
+#include "ui/native_theme/native_theme.h"
+#endif
+
// GlobalError ---------------------------------------------------------------
GlobalError::GlobalError() {}
@@ -18,10 +25,16 @@ GlobalError::~GlobalError() {}
GlobalError::Severity GlobalError::GetSeverity() { return SEVERITY_MEDIUM; }
-int GlobalError::MenuItemIconResourceID() {
- // If you change this make sure to also change the bubble icon and the wrench
- // icon color.
- return IDR_INPUT_ALERT_MENU;
+gfx::Image GlobalError::MenuItemIcon() {
+#if defined(OS_MACOSX) || defined(OS_ANDROID)
+ return ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ IDR_INPUT_ALERT_MENU);
+#else
+ SkColor icon_color;
+ ui::CommonThemeGetSystemColor(ui::NativeTheme::kColorId_Amber, &icon_color);
+ return gfx::Image(
+ gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 18, icon_color));
+#endif
}
// GlobalErrorWithStandardBubble ---------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698