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

Side by Side Diff: ash/system/tray/system_tray_notifier.cc

Issue 2923083002: chromeos: Convert system tray session length limit to mojo (Closed)
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ash/system/tray/system_tray_notifier.h" 5 #include "ash/system/tray/system_tray_notifier.h"
6 6
7 #include "ash/system/accessibility_observer.h" 7 #include "ash/system/accessibility_observer.h"
8 #include "ash/system/bluetooth/bluetooth_observer.h" 8 #include "ash/system/bluetooth/bluetooth_observer.h"
9 #include "ash/system/date/clock_observer.h" 9 #include "ash/system/date/clock_observer.h"
10 #include "ash/system/enterprise/enterprise_domain_observer.h" 10 #include "ash/system/enterprise/enterprise_domain_observer.h"
11 #include "ash/system/ime/ime_observer.h" 11 #include "ash/system/ime/ime_observer.h"
12 #include "ash/system/network/network_observer.h" 12 #include "ash/system/network/network_observer.h"
13 #include "ash/system/network/network_portal_detector_observer.h" 13 #include "ash/system/network/network_portal_detector_observer.h"
14 #include "ash/system/screen_security/screen_capture_observer.h" 14 #include "ash/system/screen_security/screen_capture_observer.h"
15 #include "ash/system/screen_security/screen_share_observer.h" 15 #include "ash/system/screen_security/screen_share_observer.h"
16 #include "ash/system/session/last_window_closed_observer.h" 16 #include "ash/system/session/last_window_closed_observer.h"
17 #include "ash/system/session/logout_button_observer.h" 17 #include "ash/system/session/logout_button_observer.h"
18 #include "ash/system/session/session_length_limit_observer.h"
19 #include "ash/system/status_area_focus_observer.h" 18 #include "ash/system/status_area_focus_observer.h"
20 #include "ash/system/tray_tracing.h" 19 #include "ash/system/tray_tracing.h"
21 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h" 20 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h"
22 21
23 namespace ash { 22 namespace ash {
24 23
25 SystemTrayNotifier::SystemTrayNotifier() {} 24 SystemTrayNotifier::SystemTrayNotifier() {}
26 25
27 SystemTrayNotifier::~SystemTrayNotifier() {} 26 SystemTrayNotifier::~SystemTrayNotifier() {}
28 27
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 const base::string16& helper_name) { 221 const base::string16& helper_name) {
223 for (auto& observer : screen_share_observers_) 222 for (auto& observer : screen_share_observers_)
224 observer.OnScreenShareStart(stop_callback, helper_name); 223 observer.OnScreenShareStart(stop_callback, helper_name);
225 } 224 }
226 225
227 void SystemTrayNotifier::NotifyScreenShareStop() { 226 void SystemTrayNotifier::NotifyScreenShareStop() {
228 for (auto& observer : screen_share_observers_) 227 for (auto& observer : screen_share_observers_)
229 observer.OnScreenShareStop(); 228 observer.OnScreenShareStop();
230 } 229 }
231 230
232 void SystemTrayNotifier::AddSessionLengthLimitObserver(
233 SessionLengthLimitObserver* observer) {
234 session_length_limit_observers_.AddObserver(observer);
235 }
236
237 void SystemTrayNotifier::RemoveSessionLengthLimitObserver(
238 SessionLengthLimitObserver* observer) {
239 session_length_limit_observers_.RemoveObserver(observer);
240 }
241
242 void SystemTrayNotifier::NotifySessionStartTimeChanged() {
243 for (auto& observer : session_length_limit_observers_)
244 observer.OnSessionStartTimeChanged();
245 }
246
247 void SystemTrayNotifier::NotifySessionLengthLimitChanged() {
248 for (auto& observer : session_length_limit_observers_)
249 observer.OnSessionLengthLimitChanged();
250 }
251
252 void SystemTrayNotifier::AddStatusAreaFocusObserver( 231 void SystemTrayNotifier::AddStatusAreaFocusObserver(
253 StatusAreaFocusObserver* observer) { 232 StatusAreaFocusObserver* observer) {
254 status_area_focus_observers_.AddObserver(observer); 233 status_area_focus_observers_.AddObserver(observer);
255 } 234 }
256 235
257 void SystemTrayNotifier::RemoveStatusAreaFocusObserver( 236 void SystemTrayNotifier::RemoveStatusAreaFocusObserver(
258 StatusAreaFocusObserver* observer) { 237 StatusAreaFocusObserver* observer) {
259 status_area_focus_observers_.RemoveObserver(observer); 238 status_area_focus_observers_.RemoveObserver(observer);
260 } 239 }
261 240
(...skipping 25 matching lines...) Expand all
287 virtual_keyboard_observers_.RemoveObserver(observer); 266 virtual_keyboard_observers_.RemoveObserver(observer);
288 } 267 }
289 268
290 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( 269 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged(
291 bool suppressed) { 270 bool suppressed) {
292 for (auto& observer : virtual_keyboard_observers_) 271 for (auto& observer : virtual_keyboard_observers_)
293 observer.OnKeyboardSuppressionChanged(suppressed); 272 observer.OnKeyboardSuppressionChanged(suppressed);
294 } 273 }
295 274
296 } // namespace ash 275 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698