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

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

Issue 2558043006: ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: fix gcc Created 4 years 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
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_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
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
72 class NetworkingConfigDelegate; 54 class NetworkingConfigDelegate;
73 55
74 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the 56 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the
75 // application (e.g. Chrome). These tasks should be limited to application 57 // application (e.g. Chrome). These tasks should be limited to application
76 // (browser) specific tasks. For non application specific tasks, where possible, 58 // (browser) specific tasks. For non application specific tasks, where possible,
77 // components/, chromeos/, device/, etc., code should be used directly. If more 59 // components/, chromeos/, device/, etc., code should be used directly. If more
78 // than one related method is being added, consider adding an additional 60 // than one related method is being added, consider adding an additional
79 // specific delegate (e.g. CastConfigDelegate). 61 // specific delegate (e.g. CastConfigDelegate).
80 // 62 //
81 // These methods should all have trivial default implementations for platforms 63 // These methods should all have trivial default implementations for platforms
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 98
117 // Returns true if the current user is supervised: has legacy supervised 99 // Returns true if the current user is supervised: has legacy supervised
118 // account or kid account. 100 // account or kid account.
119 virtual bool IsUserSupervised() const; 101 virtual bool IsUserSupervised() const;
120 102
121 // Returns true if the current user is child. 103 // Returns true if the current user is child.
122 // TODO(merkulova): remove on FakeUserManager componentization. 104 // TODO(merkulova): remove on FakeUserManager componentization.
123 // crbug.com/443119 105 // crbug.com/443119
124 virtual bool IsUserChild() const; 106 virtual bool IsUserChild() const;
125 107
126 // Fills |info| structure (which must not be null) with current update info.
127 virtual void GetSystemUpdateInfo(UpdateInfo* info) const;
128
129 // Returns true if settings menu item should appear. 108 // Returns true if settings menu item should appear.
130 virtual bool ShouldShowSettings() const; 109 virtual bool ShouldShowSettings() const;
131 110
132 // Returns true if notification tray should appear. 111 // Returns true if notification tray should appear.
133 virtual bool ShouldShowNotificationTray() const; 112 virtual bool ShouldShowNotificationTray() const;
134 113
135 // Shows information about enterprise enrolled devices. 114 // Shows information about enterprise enrolled devices.
136 virtual void ShowEnterpriseInfo(); 115 virtual void ShowEnterpriseInfo();
137 116
138 // Shows login UI to add other users to this session. 117 // Shows login UI to add other users to this session.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Creates a system tray item for display rotation lock. 194 // Creates a system tray item for display rotation lock.
216 // TODO(jamescook): Remove this when mus has support for display management 195 // TODO(jamescook): Remove this when mus has support for display management
217 // and we have a DisplayManager equivalent. See http://crbug.com/548429 196 // and we have a DisplayManager equivalent. See http://crbug.com/548429
218 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( 197 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem(
219 SystemTray* tray); 198 SystemTray* tray);
220 }; 199 };
221 200
222 } // namespace ash 201 } // namespace ash
223 202
224 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 203 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_controller.cc ('k') | ash/common/system/tray/system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698