OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/status/language_menu_button.h" | 5 #include "chrome/browser/chromeos/status/language_menu_button.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ALLOW_THIS_IN_INITIALIZER_LIST(language_menu_(this)), | 136 ALLOW_THIS_IN_INITIALIZER_LIST(language_menu_(this)), |
137 host_(host), | 137 host_(host), |
138 logged_in_(false) { | 138 logged_in_(false) { |
139 DCHECK(input_method_descriptors_.get() && | 139 DCHECK(input_method_descriptors_.get() && |
140 !input_method_descriptors_->empty()); | 140 !input_method_descriptors_->empty()); |
141 set_border(NULL); | 141 set_border(NULL); |
142 SetFont(ResourceBundle::GetSharedInstance().GetFont( | 142 SetFont(ResourceBundle::GetSharedInstance().GetFont( |
143 ResourceBundle::BaseFont).DeriveFont(1, gfx::Font::BOLD)); | 143 ResourceBundle::BaseFont).DeriveFont(1, gfx::Font::BOLD)); |
144 SetEnabledColor(0xB3FFFFFF); // White with 70% Alpha | 144 SetEnabledColor(0xB3FFFFFF); // White with 70% Alpha |
145 SetDisabledColor(0x00FFFFFF); // White with 00% Alpha (invisible) | 145 SetDisabledColor(0x00FFFFFF); // White with 00% Alpha (invisible) |
146 SetShowHighlighted(false); | 146 SetShowMultipleStates(false); |
147 // Update the model | 147 // Update the model |
148 RebuildModel(); | 148 RebuildModel(); |
149 // Grab the real estate. | 149 // Grab the real estate. |
150 UpdateIndicator(kSpacer, L"" /* no tooltip */); | 150 UpdateIndicator(kSpacer, L"" /* no tooltip */); |
151 | 151 |
152 // Draw the default indicator "US". The default indicator "US" is used when | 152 // Draw the default indicator "US". The default indicator "US" is used when |
153 // |pref_service| is not available (for example, unit tests) or |pref_service| | 153 // |pref_service| is not available (for example, unit tests) or |pref_service| |
154 // is available, but Chrome preferences are not available (for example, | 154 // is available, but Chrome preferences are not available (for example, |
155 // initial OS boot). | 155 // initial OS boot). |
156 UpdateIndicator(L"US", L""); | 156 UpdateIndicator(L"US", L""); |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 | 663 |
664 void LanguageMenuButton::Observe(NotificationType type, | 664 void LanguageMenuButton::Observe(NotificationType type, |
665 const NotificationSource& source, | 665 const NotificationSource& source, |
666 const NotificationDetails& details) { | 666 const NotificationDetails& details) { |
667 if (type == NotificationType::LOGIN_USER_CHANGED) { | 667 if (type == NotificationType::LOGIN_USER_CHANGED) { |
668 logged_in_ = true; | 668 logged_in_ = true; |
669 } | 669 } |
670 } | 670 } |
671 | 671 |
672 } // namespace chromeos | 672 } // namespace chromeos |
OLD | NEW |