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

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

Issue 1718563002: Convert location bar decorations to Material Design (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_toolbar
Patch Set: Fix issue from browser test. Created 4 years, 9 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/bubble_decoration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
index 5087453f323047a4b245edf5d0713aa1838bd88e..0fc97f6c8eb4264f665517b96994dd71c60b67b5 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
@@ -369,6 +369,14 @@ const CGFloat kAnimationDuration = 0.2;
return;
}
+ // Allow the ToolbarController to take action upon the
+ // AutocompleteTextField being added to the window.
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ BrowserWindowController* browserWindowController =
+ [BrowserWindowController browserWindowControllerForView:self];
+ [[browserWindowController toolbarController] locationBarWasAddedToWindow];
+ }
+
// Invert the textfield's colors when Material Design and Incognito and not
// a custom theme.
if (ui::MaterialDesignController::IsModeMaterial() &&
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/bubble_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698