| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { | 183 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { |
| 184 WebContents* web_contents = GetWebContents(); | 184 WebContents* web_contents = GetWebContents(); |
| 185 if (!web_contents) | 185 if (!web_contents) |
| 186 return; | 186 return; |
| 187 ManagePasswordsUIController::FromWebContents(web_contents) | 187 ManagePasswordsUIController::FromWebContents(web_contents) |
| 188 ->UpdateIconAndBubbleState(manage_passwords_decoration_->icon()); | 188 ->UpdateIconAndBubbleState(manage_passwords_decoration_->icon()); |
| 189 OnDecorationsChanged(); | 189 OnDecorationsChanged(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void LocationBarViewMac::UpdateSaveCreditCardIcon() { |
| 193 NOTIMPLEMENTED(); |
| 194 } |
| 195 |
| 192 void LocationBarViewMac::UpdatePageActions() { | 196 void LocationBarViewMac::UpdatePageActions() { |
| 193 RefreshPageActionDecorations(); | 197 RefreshPageActionDecorations(); |
| 194 Layout(); | 198 Layout(); |
| 195 | 199 |
| 196 [field_ updateMouseTracking]; | 200 [field_ updateMouseTracking]; |
| 197 [field_ setNeedsDisplay:YES]; | 201 [field_ setNeedsDisplay:YES]; |
| 198 } | 202 } |
| 199 | 203 |
| 200 void LocationBarViewMac::UpdateBookmarkStarVisibility() { | 204 void LocationBarViewMac::UpdateBookmarkStarVisibility() { |
| 201 star_decoration_->SetVisible(IsStarEnabled()); | 205 star_decoration_->SetVisible(IsStarEnabled()); |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 } | 729 } |
| 726 | 730 |
| 727 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 731 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
| 728 bool is_visible = !GetToolbarModel()->input_in_progress() && | 732 bool is_visible = !GetToolbarModel()->input_in_progress() && |
| 729 browser_->search_model()->voice_search_supported(); | 733 browser_->search_model()->voice_search_supported(); |
| 730 if (mic_search_decoration_->IsVisible() == is_visible) | 734 if (mic_search_decoration_->IsVisible() == is_visible) |
| 731 return false; | 735 return false; |
| 732 mic_search_decoration_->SetVisible(is_visible); | 736 mic_search_decoration_->SetVisible(is_visible); |
| 733 return true; | 737 return true; |
| 734 } | 738 } |
| OLD | NEW |