Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: ash/system/locale/tray_locale.h

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/locale/tray_locale.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/locale/tray_locale.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698