Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 | 179 |
| 180 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { | 180 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { |
| 181 WebContents* web_contents = GetWebContents(); | 181 WebContents* web_contents = GetWebContents(); |
| 182 if (!web_contents) | 182 if (!web_contents) |
| 183 return; | 183 return; |
| 184 ManagePasswordsUIController::FromWebContents(web_contents) | 184 ManagePasswordsUIController::FromWebContents(web_contents) |
| 185 ->UpdateIconAndBubbleState(manage_passwords_decoration_->icon()); | 185 ->UpdateIconAndBubbleState(manage_passwords_decoration_->icon()); |
| 186 OnDecorationsChanged(); | 186 OnDecorationsChanged(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void LocationBarViewMac::UpdateSaveCreditCardIcon() { | |
| 190 // Not implemented on Mac. | |
|
bondd
2015/10/22 17:10:02
Using comment instead of NOTIMPLEMENTED to keep wi
| |
| 191 } | |
| 192 | |
| 189 void LocationBarViewMac::UpdatePageActions() { | 193 void LocationBarViewMac::UpdatePageActions() { |
| 190 RefreshPageActionDecorations(); | 194 RefreshPageActionDecorations(); |
| 191 Layout(); | 195 Layout(); |
| 192 | 196 |
| 193 [field_ updateMouseTracking]; | 197 [field_ updateMouseTracking]; |
| 194 [field_ setNeedsDisplay:YES]; | 198 [field_ setNeedsDisplay:YES]; |
| 195 } | 199 } |
| 196 | 200 |
| 197 void LocationBarViewMac::UpdateBookmarkStarVisibility() { | 201 void LocationBarViewMac::UpdateBookmarkStarVisibility() { |
| 198 star_decoration_->SetVisible(IsStarEnabled()); | 202 star_decoration_->SetVisible(IsStarEnabled()); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 715 } | 719 } |
| 716 | 720 |
| 717 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 721 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
| 718 bool is_visible = !GetToolbarModel()->input_in_progress() && | 722 bool is_visible = !GetToolbarModel()->input_in_progress() && |
| 719 browser_->search_model()->voice_search_supported(); | 723 browser_->search_model()->voice_search_supported(); |
| 720 if (mic_search_decoration_->IsVisible() == is_visible) | 724 if (mic_search_decoration_->IsVisible() == is_visible) |
| 721 return false; | 725 return false; |
| 722 mic_search_decoration_->SetVisible(is_visible); | 726 mic_search_decoration_->SetVisible(is_visible); |
| 723 return true; | 727 return true; |
| 724 } | 728 } |
| OLD | NEW |