OLD | NEW |
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 Loading... |
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::UpdateLocationBarVisibility(bool visible, |
| 206 bool animate) { |
| 207 // Not implemented on Mac. |
| 208 } |
| 209 |
205 bool LocationBarViewMac::ShowPageActionPopup( | 210 bool LocationBarViewMac::ShowPageActionPopup( |
206 const extensions::Extension* extension, bool grant_active_tab) { | 211 const extensions::Extension* extension, bool grant_active_tab) { |
207 for (ScopedVector<PageActionDecoration>::iterator iter = | 212 for (ScopedVector<PageActionDecoration>::iterator iter = |
208 page_action_decorations_.begin(); | 213 page_action_decorations_.begin(); |
209 iter != page_action_decorations_.end(); ++iter) { | 214 iter != page_action_decorations_.end(); ++iter) { |
210 if ((*iter)->GetExtension() == extension) | 215 if ((*iter)->GetExtension() == extension) |
211 return (*iter)->ActivatePageAction(grant_active_tab); | 216 return (*iter)->ActivatePageAction(grant_active_tab); |
212 } | 217 } |
213 return false; | 218 return false; |
214 } | 219 } |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 729 } |
725 | 730 |
726 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 731 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
727 bool is_visible = !GetToolbarModel()->input_in_progress() && | 732 bool is_visible = !GetToolbarModel()->input_in_progress() && |
728 browser_->search_model()->voice_search_supported(); | 733 browser_->search_model()->voice_search_supported(); |
729 if (mic_search_decoration_->IsVisible() == is_visible) | 734 if (mic_search_decoration_->IsVisible() == is_visible) |
730 return false; | 735 return false; |
731 mic_search_decoration_->SetVisible(is_visible); | 736 mic_search_decoration_->SetVisible(is_visible); |
732 return true; | 737 return true; |
733 } | 738 } |
OLD | NEW |