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

Side by Side Diff: ash/system/chromeos/settings/tray_settings.h

Issue 18176013: chromeos: Refactor system tray code into PowerStatus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove virtual Created 7 years, 5 months 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_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_ 5 #ifndef ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
6 #define ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_ 6 #define ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
7 7
8 #include "ash/system/chromeos/power/power_status.h"
9 #include "ash/system/tray/system_tray_item.h" 8 #include "ash/system/tray/system_tray_item.h"
10 9
11 namespace ash { 10 namespace ash {
12 namespace internal { 11 namespace internal {
13 12
14 namespace tray { 13 namespace tray {
15 class SettingsDefaultView; 14 class SettingsDefaultView;
16 } 15 }
17 16
18 class TraySettings : public SystemTrayItem, public PowerStatus::Observer { 17 class TraySettings : public SystemTrayItem {
19 public: 18 public:
20 explicit TraySettings(SystemTray* system_tray); 19 explicit TraySettings(SystemTray* system_tray);
21 virtual ~TraySettings(); 20 virtual ~TraySettings();
22 21
23 private: 22 private:
24 // Overridden from SystemTrayItem 23 // Overridden from SystemTrayItem
25 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; 24 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
26 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 25 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
27 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; 26 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
28 virtual void DestroyTrayView() OVERRIDE; 27 virtual void DestroyTrayView() OVERRIDE;
29 virtual void DestroyDefaultView() OVERRIDE; 28 virtual void DestroyDefaultView() OVERRIDE;
30 virtual void DestroyDetailedView() OVERRIDE; 29 virtual void DestroyDetailedView() OVERRIDE;
31 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; 30 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
32 31
33 // Overridden from PowerStatus::Observer.
34 virtual void OnPowerStatusChanged(
35 const chromeos::PowerSupplyStatus& status) OVERRIDE;
36
37 tray::SettingsDefaultView* default_view_; 32 tray::SettingsDefaultView* default_view_;
38 33
39 DISALLOW_COPY_AND_ASSIGN(TraySettings); 34 DISALLOW_COPY_AND_ASSIGN(TraySettings);
40 }; 35 };
41 36
42 } // namespace internal 37 } // namespace internal
43 } // namespace ash 38 } // namespace ash
44 39
45 #endif // ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_ 40 #endif // ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
OLDNEW
« no previous file with comments | « ash/system/chromeos/power/tray_power_unittest.cc ('k') | ash/system/chromeos/settings/tray_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698