| 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::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 Loading... |
| 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 } |
| OLD | NEW |