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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 location_icon_decoration_(new LocationIconDecoration(this)), | 92 location_icon_decoration_(new LocationIconDecoration(this)), |
93 selected_keyword_decoration_(new SelectedKeywordDecoration()), | 93 selected_keyword_decoration_(new SelectedKeywordDecoration()), |
94 ev_bubble_decoration_( | 94 ev_bubble_decoration_( |
95 new EVBubbleDecoration(location_icon_decoration_.get())), | 95 new EVBubbleDecoration(location_icon_decoration_.get())), |
96 star_decoration_(new StarDecoration(command_updater)), | 96 star_decoration_(new StarDecoration(command_updater)), |
97 zoom_decoration_(new ZoomDecoration(this)), | 97 zoom_decoration_(new ZoomDecoration(this)), |
98 keyword_hint_decoration_(new KeywordHintDecoration()), | 98 keyword_hint_decoration_(new KeywordHintDecoration()), |
99 mic_search_decoration_(new MicSearchDecoration(command_updater)), | 99 mic_search_decoration_(new MicSearchDecoration(command_updater)), |
100 generated_credit_card_decoration_( | 100 generated_credit_card_decoration_( |
101 new GeneratedCreditCardDecoration(this)), | 101 new GeneratedCreditCardDecoration(this)), |
102 search_button_decoration_(new SearchButtonDecoration()), | 102 search_button_decoration_(new SearchButtonDecoration(this)), |
103 profile_(profile), | 103 profile_(profile), |
104 browser_(browser), | 104 browser_(browser), |
105 weak_ptr_factory_(this) { | 105 weak_ptr_factory_(this) { |
106 | 106 |
107 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { | 107 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { |
108 DCHECK_EQ(i, content_setting_decorations_.size()); | 108 DCHECK_EQ(i, content_setting_decorations_.size()); |
109 ContentSettingsType type = static_cast<ContentSettingsType>(i); | 109 ContentSettingsType type = static_cast<ContentSettingsType>(i); |
110 content_setting_decorations_.push_back( | 110 content_setting_decorations_.push_back( |
111 new ContentSettingDecoration(type, this, profile_)); | 111 new ContentSettingDecoration(type, this, profile_)); |
112 } | 112 } |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 706 } |
707 | 707 |
708 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 708 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
709 bool is_visible = !GetToolbarModel()->input_in_progress() && | 709 bool is_visible = !GetToolbarModel()->input_in_progress() && |
710 browser_->search_model()->voice_search_supported(); | 710 browser_->search_model()->voice_search_supported(); |
711 if (mic_search_decoration_->IsVisible() == is_visible) | 711 if (mic_search_decoration_->IsVisible() == is_visible) |
712 return false; | 712 return false; |
713 mic_search_decoration_->SetVisible(is_visible); | 713 mic_search_decoration_->SetVisible(is_visible); |
714 return true; | 714 return true; |
715 } | 715 } |
OLD | NEW |