OLD | NEW |
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> |
11 | 11 |
12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
13 #include "ash/system/user/login_status.h" | 13 #include "ash/system/user/login_status.h" |
14 #include "ash/system/power/power_supply_status.h" | 14 #include "ash/system/power/power_supply_status.h" |
15 #include "base/file_path.h" | |
16 #include "base/i18n/time_formatting.h" | 15 #include "base/i18n/time_formatting.h" |
17 #include "base/string16.h" | 16 #include "base/string16.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
19 | 18 |
20 class SkBitmap; | 19 class SkBitmap; |
21 | 20 |
22 namespace ash { | 21 namespace ash { |
23 | 22 |
24 struct ASH_EXPORT NetworkIconInfo { | 23 struct ASH_EXPORT NetworkIconInfo { |
25 NetworkIconInfo(); | 24 NetworkIconInfo(); |
(...skipping 11 matching lines...) Expand all Loading... |
37 BluetoothDeviceInfo(); | 36 BluetoothDeviceInfo(); |
38 ~BluetoothDeviceInfo(); | 37 ~BluetoothDeviceInfo(); |
39 | 38 |
40 std::string address; | 39 std::string address; |
41 string16 display_name; | 40 string16 display_name; |
42 bool connected; | 41 bool connected; |
43 }; | 42 }; |
44 | 43 |
45 typedef std::vector<BluetoothDeviceInfo> BluetoothDeviceList; | 44 typedef std::vector<BluetoothDeviceInfo> BluetoothDeviceList; |
46 | 45 |
47 // Structure that packs progress information of each operation. | |
48 struct ASH_EXPORT DriveOperationStatus { | |
49 enum OperationType { | |
50 OPERATION_UPLOAD, | |
51 OPERATION_DOWNLOAD, | |
52 OPERATION_OTHER, | |
53 }; | |
54 | |
55 enum OperationState { | |
56 OPERATION_NOT_STARTED, | |
57 OPERATION_STARTED, | |
58 OPERATION_IN_PROGRESS, | |
59 OPERATION_COMPLETED, | |
60 OPERATION_FAILED, | |
61 OPERATION_SUSPENDED, | |
62 }; | |
63 | |
64 DriveOperationStatus(); | |
65 ~DriveOperationStatus(); | |
66 | |
67 // File path. | |
68 FilePath file_path; | |
69 // Current operation completion progress [0.0 - 1.0]. | |
70 double progress; | |
71 OperationType type; | |
72 OperationState state; | |
73 }; | |
74 | |
75 typedef std::vector<DriveOperationStatus> DriveOperationStatusList; | |
76 | |
77 | |
78 struct ASH_EXPORT IMEPropertyInfo { | 46 struct ASH_EXPORT IMEPropertyInfo { |
79 IMEPropertyInfo(); | 47 IMEPropertyInfo(); |
80 ~IMEPropertyInfo(); | 48 ~IMEPropertyInfo(); |
81 | 49 |
82 bool selected; | 50 bool selected; |
83 std::string key; | 51 std::string key; |
84 string16 name; | 52 string16 name; |
85 }; | 53 }; |
86 | 54 |
87 typedef std::vector<IMEPropertyInfo> IMEPropertyInfoList; | 55 typedef std::vector<IMEPropertyInfo> IMEPropertyInfoList; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 99 |
132 // Shows the settings related to date, timezone etc. | 100 // Shows the settings related to date, timezone etc. |
133 virtual void ShowDateSettings() = 0; | 101 virtual void ShowDateSettings() = 0; |
134 | 102 |
135 // Shows the settings related to network. | 103 // Shows the settings related to network. |
136 virtual void ShowNetworkSettings() = 0; | 104 virtual void ShowNetworkSettings() = 0; |
137 | 105 |
138 // Shows the settings related to bluetooth. | 106 // Shows the settings related to bluetooth. |
139 virtual void ShowBluetoothSettings() = 0; | 107 virtual void ShowBluetoothSettings() = 0; |
140 | 108 |
141 // Shows settings related to Google Drive. | |
142 virtual void ShowDriveSettings() = 0; | |
143 | |
144 // Shows settings related to input methods. | 109 // Shows settings related to input methods. |
145 virtual void ShowIMESettings() = 0; | 110 virtual void ShowIMESettings() = 0; |
146 | 111 |
147 // Shows help. | 112 // Shows help. |
148 virtual void ShowHelp() = 0; | 113 virtual void ShowHelp() = 0; |
149 | 114 |
150 // Is the system audio muted? | 115 // Is the system audio muted? |
151 virtual bool IsAudioMuted() const = 0; | 116 virtual bool IsAudioMuted() const = 0; |
152 | 117 |
153 // Mutes/Unmutes the audio system. | 118 // Mutes/Unmutes the audio system. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 159 |
195 // Returns a list of properties for the currently selected IME. | 160 // Returns a list of properties for the currently selected IME. |
196 virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) = 0; | 161 virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) = 0; |
197 | 162 |
198 // Switches to the selected input method. | 163 // Switches to the selected input method. |
199 virtual void SwitchIME(const std::string& ime_id) = 0; | 164 virtual void SwitchIME(const std::string& ime_id) = 0; |
200 | 165 |
201 // Activates an IME property. | 166 // Activates an IME property. |
202 virtual void ActivateIMEProperty(const std::string& key) = 0; | 167 virtual void ActivateIMEProperty(const std::string& key) = 0; |
203 | 168 |
204 // Cancels ongoing drive operation. | |
205 virtual void CancelDriveOperation(const FilePath& file_path) = 0; | |
206 | |
207 // Returns information about the ongoing drive operations. | |
208 virtual void GetDriveOperationStatusList( | |
209 DriveOperationStatusList* list) = 0; | |
210 | |
211 // Returns information about the most relevant network. Relevance is | 169 // Returns information about the most relevant network. Relevance is |
212 // determined by the implementor (e.g. a connecting network may be more | 170 // determined by the implementor (e.g. a connecting network may be more |
213 // relevant over a connected network etc.) | 171 // relevant over a connected network etc.) |
214 virtual void GetMostRelevantNetworkIcon(NetworkIconInfo* info, | 172 virtual void GetMostRelevantNetworkIcon(NetworkIconInfo* info, |
215 bool large) = 0; | 173 bool large) = 0; |
216 | 174 |
217 // Returns information about the available networks. | 175 // Returns information about the available networks. |
218 virtual void GetAvailableNetworks(std::vector<NetworkIconInfo>* list) = 0; | 176 virtual void GetAvailableNetworks(std::vector<NetworkIconInfo>* list) = 0; |
219 | 177 |
220 // Connects to the network specified by the unique id. | 178 // Connects to the network specified by the unique id. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Opens the cellular network specific URL. | 239 // Opens the cellular network specific URL. |
282 virtual void ShowCellularURL(const std::string& url) = 0; | 240 virtual void ShowCellularURL(const std::string& url) = 0; |
283 | 241 |
284 // Shows UI for changing proxy settings. | 242 // Shows UI for changing proxy settings. |
285 virtual void ChangeProxySettings() = 0; | 243 virtual void ChangeProxySettings() = 0; |
286 }; | 244 }; |
287 | 245 |
288 } // namespace ash | 246 } // namespace ash |
289 | 247 |
290 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 248 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
OLD | NEW |