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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm

Issue 2644903004: Move around more vector icons. (Closed)
Patch Set: fix comment 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/cocoa/location_bar/location_bar_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
index e8a0f19194796770c961b1cfa88ae0b1b9e282b6..b67c5895b1fe3d6a001ac1957aa0112f62852363 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
@@ -329,8 +329,8 @@ NSPoint LocationBarDecoration::GetBubblePointInFrame(NSRect frame) {
NSImage* LocationBarDecoration::GetMaterialIcon(
bool location_bar_is_dark) const {
const int kIconSize = 16;
- gfx::VectorIconId vector_icon_id = GetMaterialVectorIconId();
- if (vector_icon_id == gfx::VectorIconId::VECTOR_ICON_NONE) {
+ const gfx::VectorIcon* vector_icon = GetMaterialVectorIcon();
+ if (!vector_icon) {
// Return an empty image when the decoration specifies no vector icon, so
// that its bubble is positioned correctly (the position is based on the
// width of the image; returning nil will mess up the positioning).
@@ -340,7 +340,7 @@ NSImage* LocationBarDecoration::GetMaterialIcon(
SkColor vector_icon_color = GetMaterialIconColor(location_bar_is_dark);
return NSImageFromImageSkia(
- gfx::CreateVectorIcon(vector_icon_id, kIconSize, vector_icon_color));
+ gfx::CreateVectorIcon(*vector_icon, kIconSize, vector_icon_color));
}
// static
@@ -380,7 +380,7 @@ NSColor* LocationBarDecoration::GetDividerColor(
[NSColor colorWithCalibratedWhite:gray_scale alpha:kDividerAlpha / 255.0];
}
-gfx::VectorIconId LocationBarDecoration::GetMaterialVectorIconId() const {
+const gfx::VectorIcon* LocationBarDecoration::GetMaterialVectorIcon() const {
NOTREACHED();
- return gfx::VectorIconId::VECTOR_ICON_NONE;
+ return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698