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

Side by Side Diff: ash/system/tray/system_tray_delegate.h

Issue 9983002: Pass correct initial/user values when requesting power status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_TRAY_SYSTEM_TRAY_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 string16 name; 62 string16 name;
63 string16 short_name; 63 string16 short_name;
64 }; 64 };
65 65
66 typedef std::vector<IMEInfo> IMEInfoList; 66 typedef std::vector<IMEInfo> IMEInfoList;
67 67
68 struct PowerSupplyStatus; 68 struct PowerSupplyStatus;
69 69
70 class SystemTrayDelegate { 70 class SystemTrayDelegate {
71 public: 71 public:
72 // TODO(stevenjb): Use PowerManagerClient::UpdateRequestType once moved to
73 // /chromeos directory.
sadrul 2012/04/10 00:01:34 Looks like the relevant code has already moved int
stevenjb 2012/04/10 18:02:03 Removed.
74 enum UpdateRequestType {
75 UPDATE_INITIAL, // Initial update request.
76 UPDATE_USER, // User initialted update request.
77 UPDATE_POLL // Update requested by poll signal.
78 };
79
72 virtual ~SystemTrayDelegate() {} 80 virtual ~SystemTrayDelegate() {}
73 81
74 // Returns true if system tray should be visible on startup. 82 // Returns true if system tray should be visible on startup.
75 virtual bool GetTrayVisibilityOnStartup() = 0; 83 virtual bool GetTrayVisibilityOnStartup() = 0;
76 84
77 // Gets information about the logged in user. 85 // Gets information about the logged in user.
78 virtual const std::string GetUserDisplayName() const = 0; 86 virtual const std::string GetUserDisplayName() const = 0;
79 virtual const std::string GetUserEmail() const = 0; 87 virtual const std::string GetUserEmail() const = 0;
80 virtual const SkBitmap& GetUserImage() const = 0; 88 virtual const SkBitmap& GetUserImage() const = 0;
81 virtual user::LoginStatus GetUserLoginStatus() const = 0; 89 virtual user::LoginStatus GetUserLoginStatus() const = 0;
82 90
83 // Returns whether a system upgrade is available. 91 // Returns whether a system upgrade is available.
84 virtual bool SystemShouldUpgrade() const = 0; 92 virtual bool SystemShouldUpgrade() const = 0;
85 93
86 // Returns the resource id for the icon to show for the update notification. 94 // Returns the resource id for the icon to show for the update notification.
87 virtual int GetSystemUpdateIconResource() const = 0; 95 virtual int GetSystemUpdateIconResource() const = 0;
88 96
89 // Returns the desired hour clock type. 97 // Returns the desired hour clock type.
90 virtual base::HourClockType GetHourClockType() const = 0; 98 virtual base::HourClockType GetHourClockType() const = 0;
91 99
92 // Gets the current power supply status. 100 // Gets the current power supply status.
93 virtual PowerSupplyStatus GetPowerSupplyStatus() const = 0; 101 virtual PowerSupplyStatus GetPowerSupplyStatus(
102 UpdateRequestType request_type) const = 0;
94 103
95 // Shows settings. 104 // Shows settings.
96 virtual void ShowSettings() = 0; 105 virtual void ShowSettings() = 0;
97 106
98 // Shows the settings related to date, timezone etc. 107 // Shows the settings related to date, timezone etc.
99 virtual void ShowDateSettings() = 0; 108 virtual void ShowDateSettings() = 0;
100 109
101 // Shows the settings related to network. 110 // Shows the settings related to network.
102 virtual void ShowNetworkSettings() = 0; 111 virtual void ShowNetworkSettings() = 0;
103 112
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // Opens the top up url. 238 // Opens the top up url.
230 virtual void ShowCellularTopupURL(const std::string& topup_url) = 0; 239 virtual void ShowCellularTopupURL(const std::string& topup_url) = 0;
231 240
232 // Shows UI for changing proxy settings. 241 // Shows UI for changing proxy settings.
233 virtual void ChangeProxySettings() = 0; 242 virtual void ChangeProxySettings() = 0;
234 }; 243 };
235 244
236 } // namespace ash 245 } // namespace ash
237 246
238 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 247 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698