OLD | NEW |
1 // Copyright (c) 2009 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" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 // comments in UpdateIndicator() | 439 // comments in UpdateIndicator() |
440 UpdateIndicatorFromInputMethod(obj->current_input_method()); | 440 UpdateIndicatorFromInputMethod(obj->current_input_method()); |
441 } | 441 } |
442 | 442 |
443 void LanguageMenuButton::ImePropertiesChanged(InputMethodLibrary* obj) { | 443 void LanguageMenuButton::ImePropertiesChanged(InputMethodLibrary* obj) { |
444 } | 444 } |
445 | 445 |
446 //////////////////////////////////////////////////////////////////////////////// | 446 //////////////////////////////////////////////////////////////////////////////// |
447 // views::View implementation: | 447 // views::View implementation: |
448 | 448 |
449 void LanguageMenuButton::LocaleChanged() { | 449 void LanguageMenuButton::OnLocaleChanged() { |
450 const InputMethodDescriptor& input_method = | 450 const InputMethodDescriptor& input_method = |
451 CrosLibrary::Get()->GetInputMethodLibrary()->current_input_method(); | 451 CrosLibrary::Get()->GetInputMethodLibrary()->current_input_method(); |
452 UpdateIndicatorFromInputMethod(input_method); | 452 UpdateIndicatorFromInputMethod(input_method); |
453 Layout(); | 453 Layout(); |
454 SchedulePaint(); | 454 SchedulePaint(); |
455 } | 455 } |
456 | 456 |
457 void LanguageMenuButton::UpdateIndicator( | 457 void LanguageMenuButton::UpdateIndicator( |
458 const std::wstring& name, const std::wstring& tooltip) { | 458 const std::wstring& name, const std::wstring& tooltip) { |
459 // Hide the button only if there is only one input method, and the input | 459 // Hide the button only if there is only one input method, and the input |
(...skipping 203 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 |