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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/app_toolbar_button.mm

Issue 2166853002: Reverse error and warning icons on app menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed warning icon and made all remaining browser_tools icons 1x (16x16) by default Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/toolbar/app_toolbar_button.h" 5 #import "chrome/browser/ui/cocoa/toolbar/app_toolbar_button.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #import "chrome/browser/ui/cocoa/themed_window.h" 8 #import "chrome/browser/ui/cocoa/themed_window.h"
9 #import "chrome/browser/ui/cocoa/view_id_util.h" 9 #import "chrome/browser/ui/cocoa/view_id_util.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 - (gfx::VectorIconId)vectorIconId { 54 - (gfx::VectorIconId)vectorIconId {
55 CHECK(ui::MaterialDesignController::IsModeMaterial()); 55 CHECK(ui::MaterialDesignController::IsModeMaterial());
56 switch (type_) { 56 switch (type_) {
57 case AppMenuIconController::IconType::NONE: 57 case AppMenuIconController::IconType::NONE:
58 DCHECK_EQ(severity_, AppMenuIconPainter::SEVERITY_NONE); 58 DCHECK_EQ(severity_, AppMenuIconPainter::SEVERITY_NONE);
59 return gfx::VectorIconId::BROWSER_TOOLS; 59 return gfx::VectorIconId::BROWSER_TOOLS;
60 case AppMenuIconController::IconType::UPGRADE_NOTIFICATION: 60 case AppMenuIconController::IconType::UPGRADE_NOTIFICATION:
61 return gfx::VectorIconId::BROWSER_TOOLS_UPDATE; 61 return gfx::VectorIconId::BROWSER_TOOLS_UPDATE;
62 case AppMenuIconController::IconType::GLOBAL_ERROR: 62 case AppMenuIconController::IconType::GLOBAL_ERROR:
63 case AppMenuIconController::IconType::INCOMPATIBILITY_WARNING:
63 return gfx::VectorIconId::BROWSER_TOOLS_ERROR; 64 return gfx::VectorIconId::BROWSER_TOOLS_ERROR;
64 case AppMenuIconController::IconType::INCOMPATIBILITY_WARNING:
65 return gfx::VectorIconId::BROWSER_TOOLS_WARNING;
66 } 65 }
67 66
68 return gfx::VectorIconId::VECTOR_ICON_NONE; 67 return gfx::VectorIconId::VECTOR_ICON_NONE;
69 } 68 }
70 69
71 - (SkColor)vectorIconColor:(BOOL)themeIsDark { 70 - (SkColor)vectorIconColor:(BOOL)themeIsDark {
72 switch (severity_) { 71 switch (severity_) {
73 case AppMenuIconPainter::Severity::SEVERITY_NONE: 72 case AppMenuIconPainter::Severity::SEVERITY_NONE:
74 return themeIsDark ? SK_ColorWHITE : gfx::kChromeIconGrey; 73 return themeIsDark ? SK_ColorWHITE : gfx::kChromeIconGrey;
75 break; 74 break;
(...skipping 20 matching lines...) Expand all
96 shouldAnimate:(BOOL)shouldAnimate { 95 shouldAnimate:(BOOL)shouldAnimate {
97 if (severity != severity_ || type != type_) { 96 if (severity != severity_ || type != type_) {
98 severity_ = severity; 97 severity_ = severity;
99 type_ = type; 98 type_ = type;
100 // Update the button state images with the new severity color or icon type. 99 // Update the button state images with the new severity color or icon type.
101 [self resetButtonStateImages]; 100 [self resetButtonStateImages];
102 } 101 }
103 } 102 }
104 103
105 @end 104 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/global_error/global_error.cc » ('j') | chrome/browser/ui/global_error/global_error.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698