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

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

Issue 2060633002: mash: Introduce WmSystemTrayNotifier for //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testupdate
Patch Set: rebase Created 4 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/system/tray_update.cc » ('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 (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 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void SystemTrayNotifier::AddTracingObserver(TracingObserver* observer) { 57 void SystemTrayNotifier::AddTracingObserver(TracingObserver* observer) {
58 tracing_observers_.AddObserver(observer); 58 tracing_observers_.AddObserver(observer);
59 } 59 }
60 60
61 void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) { 61 void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) {
62 tracing_observers_.RemoveObserver(observer); 62 tracing_observers_.RemoveObserver(observer);
63 } 63 }
64 64
65 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
66 update_observers_.AddObserver(observer);
67 }
68
69 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) {
70 update_observers_.RemoveObserver(observer);
71 }
72
73 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { 65 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) {
74 user_observers_.AddObserver(observer); 66 user_observers_.AddObserver(observer);
75 } 67 }
76 68
77 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { 69 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) {
78 user_observers_.RemoveObserver(observer); 70 user_observers_.RemoveObserver(observer);
79 } 71 }
80 72
81 #if defined(OS_CHROMEOS) 73 #if defined(OS_CHROMEOS)
82 74
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 LocaleObserver::Delegate* delegate, 265 LocaleObserver::Delegate* delegate,
274 const std::string& cur_locale, 266 const std::string& cur_locale,
275 const std::string& from_locale, 267 const std::string& from_locale,
276 const std::string& to_locale) { 268 const std::string& to_locale) {
277 FOR_EACH_OBSERVER( 269 FOR_EACH_OBSERVER(
278 LocaleObserver, 270 LocaleObserver,
279 locale_observers_, 271 locale_observers_,
280 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale)); 272 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale));
281 } 273 }
282 274
283 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) {
284 FOR_EACH_OBSERVER(
285 UpdateObserver, update_observers_, OnUpdateRecommended(info));
286 }
287
288 void SystemTrayNotifier::NotifyUserUpdate() { 275 void SystemTrayNotifier::NotifyUserUpdate() {
289 FOR_EACH_OBSERVER(UserObserver, 276 FOR_EACH_OBSERVER(UserObserver,
290 user_observers_, 277 user_observers_,
291 OnUserUpdate()); 278 OnUserUpdate());
292 } 279 }
293 280
294 void SystemTrayNotifier::NotifyUserAddedToSession() { 281 void SystemTrayNotifier::NotifyUserAddedToSession() {
295 FOR_EACH_OBSERVER(UserObserver, 282 FOR_EACH_OBSERVER(UserObserver,
296 user_observers_, 283 user_observers_,
297 OnUserAddedToSession()); 284 OnUserAddedToSession());
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( 377 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged(
391 bool suppressed) { 378 bool suppressed) {
392 FOR_EACH_OBSERVER(VirtualKeyboardObserver, 379 FOR_EACH_OBSERVER(VirtualKeyboardObserver,
393 virtual_keyboard_observers_, 380 virtual_keyboard_observers_,
394 OnKeyboardSuppressionChanged(suppressed)); 381 OnKeyboardSuppressionChanged(suppressed));
395 } 382 }
396 383
397 #endif // OS_CHROMEOS 384 #endif // OS_CHROMEOS
398 385
399 } // namespace ash 386 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/system/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698