| 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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 std::string address; | 44 std::string address; |
| 45 base::string16 display_name; | 45 base::string16 display_name; |
| 46 bool connected; | 46 bool connected; |
| 47 bool connecting; | 47 bool connecting; |
| 48 bool paired; | 48 bool paired; |
| 49 device::BluetoothDeviceType device_type; | 49 device::BluetoothDeviceType device_type; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 using BluetoothDeviceList = std::vector<BluetoothDeviceInfo>; | 52 using BluetoothDeviceList = std::vector<BluetoothDeviceInfo>; |
| 53 | 53 |
| 54 struct ASH_EXPORT UpdateInfo { |
| 55 enum UpdateSeverity { |
| 56 UPDATE_NONE, |
| 57 UPDATE_LOW, |
| 58 UPDATE_ELEVATED, |
| 59 UPDATE_HIGH, |
| 60 UPDATE_SEVERE, |
| 61 UPDATE_CRITICAL, |
| 62 }; |
| 63 |
| 64 UpdateInfo(); |
| 65 ~UpdateInfo(); |
| 66 |
| 67 UpdateSeverity severity; |
| 68 bool update_required; |
| 69 bool factory_reset_required; |
| 70 }; |
| 71 |
| 54 class NetworkingConfigDelegate; | 72 class NetworkingConfigDelegate; |
| 55 | 73 |
| 56 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the | 74 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the |
| 57 // application (e.g. Chrome). These tasks should be limited to application | 75 // application (e.g. Chrome). These tasks should be limited to application |
| 58 // (browser) specific tasks. For non application specific tasks, where possible, | 76 // (browser) specific tasks. For non application specific tasks, where possible, |
| 59 // components/, chromeos/, device/, etc., code should be used directly. If more | 77 // components/, chromeos/, device/, etc., code should be used directly. If more |
| 60 // than one related method is being added, consider adding an additional | 78 // than one related method is being added, consider adding an additional |
| 61 // specific delegate (e.g. CastConfigDelegate). | 79 // specific delegate (e.g. CastConfigDelegate). |
| 62 // | 80 // |
| 63 // These methods should all have trivial default implementations for platforms | 81 // These methods should all have trivial default implementations for platforms |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 116 |
| 99 // Returns true if the current user is supervised: has legacy supervised | 117 // Returns true if the current user is supervised: has legacy supervised |
| 100 // account or kid account. | 118 // account or kid account. |
| 101 virtual bool IsUserSupervised() const; | 119 virtual bool IsUserSupervised() const; |
| 102 | 120 |
| 103 // Returns true if the current user is child. | 121 // Returns true if the current user is child. |
| 104 // TODO(merkulova): remove on FakeUserManager componentization. | 122 // TODO(merkulova): remove on FakeUserManager componentization. |
| 105 // crbug.com/443119 | 123 // crbug.com/443119 |
| 106 virtual bool IsUserChild() const; | 124 virtual bool IsUserChild() const; |
| 107 | 125 |
| 126 // Fills |info| structure (which must not be null) with current update info. |
| 127 virtual void GetSystemUpdateInfo(UpdateInfo* info) const; |
| 128 |
| 108 // Returns true if settings menu item should appear. | 129 // Returns true if settings menu item should appear. |
| 109 virtual bool ShouldShowSettings() const; | 130 virtual bool ShouldShowSettings() const; |
| 110 | 131 |
| 111 // Returns true if notification tray should appear. | 132 // Returns true if notification tray should appear. |
| 112 virtual bool ShouldShowNotificationTray() const; | 133 virtual bool ShouldShowNotificationTray() const; |
| 113 | 134 |
| 114 // Shows information about enterprise enrolled devices. | 135 // Shows information about enterprise enrolled devices. |
| 115 virtual void ShowEnterpriseInfo(); | 136 virtual void ShowEnterpriseInfo(); |
| 116 | 137 |
| 117 // Shows login UI to add other users to this session. | 138 // Shows login UI to add other users to this session. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Creates a system tray item for display rotation lock. | 215 // Creates a system tray item for display rotation lock. |
| 195 // TODO(jamescook): Remove this when mus has support for display management | 216 // TODO(jamescook): Remove this when mus has support for display management |
| 196 // and we have a DisplayManager equivalent. See http://crbug.com/548429 | 217 // and we have a DisplayManager equivalent. See http://crbug.com/548429 |
| 197 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( | 218 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( |
| 198 SystemTray* tray); | 219 SystemTray* tray); |
| 199 }; | 220 }; |
| 200 | 221 |
| 201 } // namespace ash | 222 } // namespace ash |
| 202 | 223 |
| 203 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 224 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| OLD | NEW |