| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ | 5 #ifndef ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ |
| 6 #define ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ | 6 #define ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/system/locale/locale_observer.h" | 10 #include "ash/system/locale/locale_observer.h" |
| 11 #include "ash/system/tray/system_tray_item.h" | 11 #include "ash/system/tray/system_tray_item.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 namespace tray { | 16 namespace tray { |
| 17 class LocaleNotificationView; | 17 class LocaleNotificationView; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class TrayLocale : public SystemTrayItem, | 20 class TrayLocale : public SystemTrayItem, |
| 21 public LocaleObserver { | 21 public LocaleObserver { |
| 22 public: | 22 public: |
| 23 TrayLocale(); | 23 explicit TrayLocale(SystemTray* system_tray); |
| 24 virtual ~TrayLocale(); | 24 virtual ~TrayLocale(); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // Overridden from TrayImageItem. | 27 // Overridden from TrayImageItem. |
| 28 virtual views::View* CreateNotificationView( | 28 virtual views::View* CreateNotificationView( |
| 29 user::LoginStatus status) OVERRIDE; | 29 user::LoginStatus status) OVERRIDE; |
| 30 virtual void DestroyNotificationView() OVERRIDE; | 30 virtual void DestroyNotificationView() OVERRIDE; |
| 31 | 31 |
| 32 // Overridden from LocaleObserver. | 32 // Overridden from LocaleObserver. |
| 33 virtual void OnLocaleChanged(LocaleObserver::Delegate* delegate, | 33 virtual void OnLocaleChanged(LocaleObserver::Delegate* delegate, |
| 34 const std::string& cur_locale, | 34 const std::string& cur_locale, |
| 35 const std::string& from_locale, | 35 const std::string& from_locale, |
| 36 const std::string& to_locale) OVERRIDE; | 36 const std::string& to_locale) OVERRIDE; |
| 37 | 37 |
| 38 tray::LocaleNotificationView* notification_; | 38 tray::LocaleNotificationView* notification_; |
| 39 LocaleObserver::Delegate* delegate_; | 39 LocaleObserver::Delegate* delegate_; |
| 40 std::string cur_locale_; | 40 std::string cur_locale_; |
| 41 std::string from_locale_; | 41 std::string from_locale_; |
| 42 std::string to_locale_; | 42 std::string to_locale_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(TrayLocale); | 44 DISALLOW_COPY_AND_ASSIGN(TrayLocale); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace internal | 47 } // namespace internal |
| 48 } // namespace ash | 48 } // namespace ash |
| 49 | 49 |
| 50 #endif // ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ | 50 #endif // ASH_SYSTEM_LOCALE_TRAY_LOCALE_H_ |
| OLD | NEW |