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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 1036173002: Animate showing / hiding the location bar for bookmark apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 Layout(); 195 Layout();
196 196
197 [field_ updateMouseTracking]; 197 [field_ updateMouseTracking];
198 [field_ setNeedsDisplay:YES]; 198 [field_ setNeedsDisplay:YES];
199 } 199 }
200 200
201 void LocationBarViewMac::UpdateBookmarkStarVisibility() { 201 void LocationBarViewMac::UpdateBookmarkStarVisibility() {
202 star_decoration_->SetVisible(IsStarEnabled()); 202 star_decoration_->SetVisible(IsStarEnabled());
203 } 203 }
204 204
205 void LocationBarViewMac::UpdateLocationBarState(bool visible, bool animate) {
206 // Not implemented on Mac.
207 }
208
205 bool LocationBarViewMac::ShowPageActionPopup( 209 bool LocationBarViewMac::ShowPageActionPopup(
206 const extensions::Extension* extension, bool grant_active_tab) { 210 const extensions::Extension* extension, bool grant_active_tab) {
207 for (ScopedVector<PageActionDecoration>::iterator iter = 211 for (ScopedVector<PageActionDecoration>::iterator iter =
208 page_action_decorations_.begin(); 212 page_action_decorations_.begin();
209 iter != page_action_decorations_.end(); ++iter) { 213 iter != page_action_decorations_.end(); ++iter) {
210 if ((*iter)->GetExtension() == extension) 214 if ((*iter)->GetExtension() == extension)
211 return (*iter)->ActivatePageAction(grant_active_tab); 215 return (*iter)->ActivatePageAction(grant_active_tab);
212 } 216 }
213 return false; 217 return false;
214 } 218 }
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 728 }
725 729
726 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { 730 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() {
727 bool is_visible = !GetToolbarModel()->input_in_progress() && 731 bool is_visible = !GetToolbarModel()->input_in_progress() &&
728 browser_->search_model()->voice_search_supported(); 732 browser_->search_model()->voice_search_supported();
729 if (mic_search_decoration_->IsVisible() == is_visible) 733 if (mic_search_decoration_->IsVisible() == is_visible)
730 return false; 734 return false;
731 mic_search_decoration_->SetVisible(is_visible); 735 mic_search_decoration_->SetVisible(is_visible);
732 return true; 736 return true;
733 } 737 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698