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

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

Issue 1951033003: [Mac][Material Design] Fix SelectedKeywordDecoration tests for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add documentation. Created 4 years, 7 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 | « no previous file | chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index eb64a73eece6b39a711c4a88e673e4a768ca7c1a..f0ef51cf3c826e244e52dd1ac08a65845e6c34ea 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -459,6 +459,10 @@ void LocationBarViewMac::Layout() {
location_icon_decoration_->SetVisible(false);
selected_keyword_decoration_->SetVisible(true);
selected_keyword_decoration_->SetKeyword(short_name, is_extension_keyword);
+ // Note: the first time through this code path the
+ // |selected_keyword_decoration_| has no image set because under Material
+ // Design we need to set its color, which we cannot do until we know the
+ // theme (by being installed in a browser window).
selected_keyword_decoration_->SetImage(GetKeywordImage(keyword));
} else if (ShouldShowEVBubble()) {
// Switch from location icon to show the EV bubble instead.
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698