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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu_button.cc

Issue 2618403002: Reland crrev.com/8283cad74e0cad4840d1f with fix for static initializers. (Closed)
Patch Set: re-up Created 3 years, 11 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/views/toolbar/app_menu_button.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.cc b/chrome/browser/ui/views/toolbar/app_menu_button.cc
index b66144b72777b37ec782de9132045b256d4ec868..65edbb7ad0124d658602be78ef80dc30815163c0 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.cc
@@ -9,6 +9,7 @@
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_otr_state.h"
@@ -24,7 +25,6 @@
#include "ui/base/theme_provider.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
#include "ui/keyboard/keyboard_controller.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/menu/menu_listener.h"
@@ -136,22 +136,22 @@ void AppMenuButton::UpdateIcon() {
break;
}
- gfx::VectorIconId icon_id = gfx::VectorIconId::VECTOR_ICON_NONE;
+ const gfx::VectorIcon* icon_id = nullptr;
switch (type_) {
case AppMenuIconController::IconType::NONE:
- icon_id = gfx::VectorIconId::BROWSER_TOOLS;
+ icon_id = &kBrowserToolsIcon;
DCHECK_EQ(AppMenuIconController::Severity::NONE, severity_);
break;
case AppMenuIconController::IconType::UPGRADE_NOTIFICATION:
- icon_id = gfx::VectorIconId::BROWSER_TOOLS_UPDATE;
+ icon_id = &kBrowserToolsUpdateIcon;
break;
case AppMenuIconController::IconType::GLOBAL_ERROR:
case AppMenuIconController::IconType::INCOMPATIBILITY_WARNING:
- icon_id = gfx::VectorIconId::BROWSER_TOOLS_ERROR;
+ icon_id = &kBrowserToolsErrorIcon;
break;
}
- SetImage(views::Button::STATE_NORMAL, gfx::CreateVectorIcon(icon_id, color));
+ SetImage(views::Button::STATE_NORMAL, gfx::CreateVectorIcon(*icon_id, color));
}
void AppMenuButton::SetTrailingMargin(int margin) {

Powered by Google App Engine
This is Rietveld 408576698