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

Side by Side Diff: ash/system/ime/tray_ime.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: Modified CL to provide TrayItems and Tray*Views with parent pointers instead. 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
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_IME_TRAY_IME_H_ 5 #ifndef ASH_SYSTEM_IME_TRAY_IME_H_
6 #define ASH_SYSTEM_IME_TRAY_IME_H_ 6 #define ASH_SYSTEM_IME_TRAY_IME_H_
7 7
8 #include "ash/system/ime/ime_observer.h" 8 #include "ash/system/ime/ime_observer.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 10
11 namespace views { 11 namespace views {
12 class Label; 12 class Label;
13 } 13 }
14 14
15 namespace ash { 15 namespace ash {
16 16
17 struct IMEInfo; 17 struct IMEInfo;
18 class SystemTray;
18 19
19 namespace internal { 20 namespace internal {
20 21
21 namespace tray { 22 namespace tray {
22 class IMEDefaultView; 23 class IMEDefaultView;
23 class IMEDetailedView; 24 class IMEDetailedView;
24 class IMENotificationView; 25 class IMENotificationView;
25 } 26 }
26 27
27 class TrayItemView; 28 class TrayItemView;
28 29
29 class TrayIME : public SystemTrayItem, 30 class TrayIME : public SystemTrayItem,
30 public IMEObserver { 31 public IMEObserver {
31 public: 32 public:
32 TrayIME(); 33 explicit TrayIME(SystemTray* system_tray);
33 virtual ~TrayIME(); 34 virtual ~TrayIME();
34 35
35 private: 36 private:
36 void UpdateTrayLabel(const IMEInfo& info, size_t count); 37 void UpdateTrayLabel(const IMEInfo& info, size_t count);
37 38
38 // Overridden from SystemTrayItem. 39 // Overridden from SystemTrayItem.
39 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; 40 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
40 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 41 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
41 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; 42 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
42 virtual views::View* CreateNotificationView( 43 virtual views::View* CreateNotificationView(
(...skipping 16 matching lines...) Expand all
59 60
60 bool message_shown_; 61 bool message_shown_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(TrayIME); 63 DISALLOW_COPY_AND_ASSIGN(TrayIME);
63 }; 64 };
64 65
65 } // namespace internal 66 } // namespace internal
66 } // namespace ash 67 } // namespace ash
67 68
68 #endif // ASH_SYSTEM_IME_TRAY_IME_H_ 69 #endif // ASH_SYSTEM_IME_TRAY_IME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698