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

Unified Diff: chrome/browser/ui/cocoa/hover_close_button.mm

Issue 2623693003: Move more vector icons into respective directories. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/app/vector_icons/tablet.icon ('k') | chrome/browser/ui/tabs/tab_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/hover_close_button.mm
diff --git a/chrome/browser/ui/cocoa/hover_close_button.mm b/chrome/browser/ui/cocoa/hover_close_button.mm
index af88b06ff13cf4bff0f65519a84c770284e7933c..a5e59d57848e26c549d5a57d86894c250f902403 100644
--- a/chrome/browser/ui/cocoa/hover_close_button.mm
+++ b/chrome/browser/ui/cocoa/hover_close_button.mm
@@ -6,6 +6,7 @@
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
@@ -22,7 +23,6 @@
#include "ui/gfx/color_palette.h"
#include "ui/gfx/image/image_skia_util_mac.h"
#include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
#include "ui/resources/grit/ui_resources.h"
namespace {
@@ -160,31 +160,30 @@ NSString* const kFadeOutValueKeyPath = @"fadeOutValue";
}
- (NSImage*)imageForHoverState:(HoverState)hoverState {
- gfx::VectorIconId vectorIconID;
+ const gfx::VectorIcon* vectorIcon = nullptr;
SkColor vectorIconColor = gfx::kPlaceholderColor;
TabView* tabView = [self tabView];
switch (hoverState) {
case kHoverStateNone:
- vectorIconID = gfx::VectorIconId::TAB_CLOSE_NORMAL;
+ vectorIcon = &kTabCloseNormalIcon;
vectorIconColor =
tabView ? [tabView iconColor] : tabs::kDefaultTabTextColor;
break;
case kHoverStateMouseOver:
// For mouse over, the icon color is the fill color of the circle.
- vectorIconID = gfx::VectorIconId::TAB_CLOSE_HOVERED_PRESSED;
+ vectorIcon = &kTabCloseHoveredPressedIcon;
vectorIconColor = SkColorSetARGB(0xFF, 0xDB, 0x44, 0x37);
break;
case kHoverStateMouseDown:
// For mouse pressed, the icon color is the fill color of the circle.
- vectorIconID = gfx::VectorIconId::TAB_CLOSE_HOVERED_PRESSED;
+ vectorIcon = &kTabCloseHoveredPressedIcon;
vectorIconColor = SkColorSetARGB(0xFF, 0xA8, 0x35, 0x2A);
break;
}
return NSImageFromImageSkia(
- gfx::CreateVectorIcon(vectorIconID, kTabCloseButtonSize,
- vectorIconColor));
+ gfx::CreateVectorIcon(*vectorIcon, kTabCloseButtonSize, vectorIconColor));
}
- (void)setHoverState:(HoverState)state {
« no previous file with comments | « chrome/app/vector_icons/tablet.icon ('k') | chrome/browser/ui/tabs/tab_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698