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

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

Issue 2152823004: [Material][Mac] Animation for Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
index b48bb4ac7623f7732ad77a45a97c108267db2f7c..336d365958c2bd6f11dacad608fd536133683218 100644
--- a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm
@@ -40,18 +40,8 @@ const float kMaxBubbleFraction = 0.5;
// icon. Determined with Pixie.app.
const CGFloat kPageInfoBubblePointYOffset = 6.0;
-// TODO(shess): This is ugly, find a better way. Using it right now
-// so that I can crib from gtk and still be able to see that I'm using
-// the same values easily.
-NSColor* ColorWithRGBBytes(int rr, int gg, int bb) {
- DCHECK_LE(rr, 255);
- DCHECK_LE(bb, 255);
- DCHECK_LE(gg, 255);
- return [NSColor colorWithCalibratedRed:static_cast<float>(rr)/255.0
- green:static_cast<float>(gg)/255.0
- blue:static_cast<float>(bb)/255.0
- alpha:1.0];
-}
+// The base text color used for non-MD.
+const SkColor kBaseTextColor = SkColorSetRGB(0x07, 0x95, 0x00);
} // namespace
@@ -64,7 +54,7 @@ EVBubbleDecoration::EVBubbleDecoration(LocationIconDecoration* location_icon)
SetRetinaBaselineOffset(0.5);
} else {
// Color tuples stolen from location_bar_view_gtk.cc.
- SetTextColor(ColorWithRGBBytes(0x07, 0x95, 0x00));
+ SetTextColor(skia::SkColorToSRGBNSColor(kBaseTextColor));
}
}

Powered by Google App Engine
This is Rietveld 408576698