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

Side by Side Diff: ash/system/logout_button/tray_logout_button.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/locale/tray_locale.cc ('k') | ash/system/logout_button/tray_logout_button.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_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_ 5 #ifndef ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_
6 #define ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_ 6 #define ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_
7 7
8 #include "ash/system/logout_button/logout_button_observer.h" 8 #include "ash/system/logout_button/logout_button_observer.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.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 LogoutButton; 17 class LogoutButton;
18 } 18 }
19 19
20 // Adds a logout button to the system tray if enabled by the 20 // Adds a logout button to the system tray if enabled by the
21 // kShowLogoutButtonInTray pref. 21 // kShowLogoutButtonInTray pref.
22 class TrayLogoutButton : public SystemTrayItem, public LogoutButtonObserver { 22 class TrayLogoutButton : public SystemTrayItem, public LogoutButtonObserver {
23 public: 23 public:
24 TrayLogoutButton(); 24 explicit TrayLogoutButton(SystemTray* system_tray);
25 25
26 // Overridden from SystemTrayItem. 26 // Overridden from SystemTrayItem.
27 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; 27 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
28 virtual void DestroyTrayView() OVERRIDE; 28 virtual void DestroyTrayView() OVERRIDE;
29 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; 29 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
30 30
31 // Overridden from LogoutButtonObserver. 31 // Overridden from LogoutButtonObserver.
32 virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE; 32 virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE;
33 33
34 private: 34 private:
35 tray::LogoutButton* logout_button_; 35 tray::LogoutButton* logout_button_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(TrayLogoutButton); 37 DISALLOW_COPY_AND_ASSIGN(TrayLogoutButton);
38 }; 38 };
39 39
40 } // namespace internal 40 } // namespace internal
41 } // namespace ash 41 } // namespace ash
42 42
43 #endif // ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_ 43 #endif // ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/system/locale/tray_locale.cc ('k') | ash/system/logout_button/tray_logout_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698