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

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

Issue 2091953002: mash: Move TrayTracing to //ash/common/system/chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 5 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
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 #include "ash/system/tray/system_tray_notifier.h" 5 #include "ash/system/tray/system_tray_notifier.h"
6 6
7 namespace ash { 7 namespace ash {
8 8
9 SystemTrayNotifier::SystemTrayNotifier() { 9 SystemTrayNotifier::SystemTrayNotifier() {
10 } 10 }
11 11
12 SystemTrayNotifier::~SystemTrayNotifier() { 12 SystemTrayNotifier::~SystemTrayNotifier() {
13 } 13 }
14 14
15 void SystemTrayNotifier::AddTracingObserver(TracingObserver* observer) {
16 tracing_observers_.AddObserver(observer);
17 }
18
19 void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) {
20 tracing_observers_.RemoveObserver(observer);
21 }
22
23 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { 15 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) {
24 user_observers_.AddObserver(observer); 16 user_observers_.AddObserver(observer);
25 } 17 }
26 18
27 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { 19 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) {
28 user_observers_.RemoveObserver(observer); 20 user_observers_.RemoveObserver(observer);
29 } 21 }
30 22
31 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
32 24
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 last_window_closed_observers_.AddObserver(observer); 113 last_window_closed_observers_.AddObserver(observer);
122 } 114 }
123 115
124 void SystemTrayNotifier::RemoveLastWindowClosedObserver( 116 void SystemTrayNotifier::RemoveLastWindowClosedObserver(
125 LastWindowClosedObserver* observer) { 117 LastWindowClosedObserver* observer) {
126 last_window_closed_observers_.RemoveObserver(observer); 118 last_window_closed_observers_.RemoveObserver(observer);
127 } 119 }
128 120
129 #endif // defined(OS_CHROMEOS) 121 #endif // defined(OS_CHROMEOS)
130 122
131 void SystemTrayNotifier::NotifyTracingModeChanged(bool value) {
132 FOR_EACH_OBSERVER(
133 TracingObserver,
134 tracing_observers_,
135 OnTracingModeChanged(value));
136 }
137
138 void SystemTrayNotifier::NotifyUserUpdate() { 123 void SystemTrayNotifier::NotifyUserUpdate() {
139 FOR_EACH_OBSERVER(UserObserver, 124 FOR_EACH_OBSERVER(UserObserver,
140 user_observers_, 125 user_observers_,
141 OnUserUpdate()); 126 OnUserUpdate());
142 } 127 }
143 128
144 void SystemTrayNotifier::NotifyUserAddedToSession() { 129 void SystemTrayNotifier::NotifyUserAddedToSession() {
145 FOR_EACH_OBSERVER(UserObserver, 130 FOR_EACH_OBSERVER(UserObserver,
146 user_observers_, 131 user_observers_,
147 OnUserAddedToSession()); 132 OnUserAddedToSession());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 218
234 void SystemTrayNotifier::NotifyLastWindowClosed() { 219 void SystemTrayNotifier::NotifyLastWindowClosed() {
235 FOR_EACH_OBSERVER(LastWindowClosedObserver, 220 FOR_EACH_OBSERVER(LastWindowClosedObserver,
236 last_window_closed_observers_, 221 last_window_closed_observers_,
237 OnLastWindowClosed()); 222 OnLastWindowClosed());
238 } 223 }
239 224
240 #endif // OS_CHROMEOS 225 #endif // OS_CHROMEOS
241 226
242 } // namespace ash 227 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698