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

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

Issue 2082193002: mash: Migrate locale observer and notification to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format 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
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_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/system/audio/audio_observer.h" 14 #include "ash/system/audio/audio_observer.h"
15 #include "ash/system/chromeos/tray_tracing.h" 15 #include "ash/system/chromeos/tray_tracing.h"
16 #include "ash/system/locale/locale_observer.h"
17 #include "ash/system/user/user_observer.h" 16 #include "ash/system/user/user_observer.h"
18 #include "base/macros.h" 17 #include "base/macros.h"
19 #include "base/observer_list.h" 18 #include "base/observer_list.h"
20 19
21 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
22 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" 21 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h"
23 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" 22 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
24 #include "ash/system/chromeos/network/network_observer.h" 23 #include "ash/system/chromeos/network/network_observer.h"
25 #include "ash/system/chromeos/network/network_portal_detector_observer.h" 24 #include "ash/system/chromeos/network/network_portal_detector_observer.h"
26 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" 25 #include "ash/system/chromeos/screen_security/screen_capture_observer.h"
(...skipping 12 matching lines...) Expand all
39 #endif 38 #endif
40 39
41 class ASH_EXPORT SystemTrayNotifier { 40 class ASH_EXPORT SystemTrayNotifier {
42 public: 41 public:
43 SystemTrayNotifier(); 42 SystemTrayNotifier();
44 ~SystemTrayNotifier(); 43 ~SystemTrayNotifier();
45 44
46 void AddAudioObserver(AudioObserver* observer); 45 void AddAudioObserver(AudioObserver* observer);
47 void RemoveAudioObserver(AudioObserver* observer); 46 void RemoveAudioObserver(AudioObserver* observer);
48 47
49 void AddLocaleObserver(LocaleObserver* observer);
50 void RemoveLocaleObserver(LocaleObserver* observer);
51
52 void AddTracingObserver(TracingObserver* observer); 48 void AddTracingObserver(TracingObserver* observer);
53 void RemoveTracingObserver(TracingObserver* observer); 49 void RemoveTracingObserver(TracingObserver* observer);
54 50
55 void AddUserObserver(UserObserver* observer); 51 void AddUserObserver(UserObserver* observer);
56 void RemoveUserObserver(UserObserver* observer); 52 void RemoveUserObserver(UserObserver* observer);
57 53
58 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
59 void AddBluetoothObserver(BluetoothObserver* observer); 55 void AddBluetoothObserver(BluetoothObserver* observer);
60 void RemoveBluetoothObserver(BluetoothObserver* observer); 56 void RemoveBluetoothObserver(BluetoothObserver* observer);
61 57
(...skipping 26 matching lines...) Expand all
88 void AddLastWindowClosedObserver(LastWindowClosedObserver* observer); 84 void AddLastWindowClosedObserver(LastWindowClosedObserver* observer);
89 void RemoveLastWindowClosedObserver(LastWindowClosedObserver* observer); 85 void RemoveLastWindowClosedObserver(LastWindowClosedObserver* observer);
90 #endif 86 #endif
91 87
92 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); 88 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume);
93 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); 89 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust);
94 void NotifyAudioNodesChanged(); 90 void NotifyAudioNodesChanged();
95 void NotifyAudioActiveOutputNodeChanged(); 91 void NotifyAudioActiveOutputNodeChanged();
96 void NotifyAudioActiveInputNodeChanged(); 92 void NotifyAudioActiveInputNodeChanged();
97 void NotifyTracingModeChanged(bool value); 93 void NotifyTracingModeChanged(bool value);
98 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
99 const std::string& cur_locale,
100 const std::string& from_locale,
101 const std::string& to_locale);
102 void NotifyUserUpdate(); 94 void NotifyUserUpdate();
103 void NotifyUserAddedToSession(); 95 void NotifyUserAddedToSession();
104 #if defined(OS_CHROMEOS) 96 #if defined(OS_CHROMEOS)
105 void NotifyRefreshBluetooth(); 97 void NotifyRefreshBluetooth();
106 void NotifyBluetoothDiscoveringChanged(); 98 void NotifyBluetoothDiscoveringChanged();
107 void NotifyShowLoginButtonChanged(bool show_login_button); 99 void NotifyShowLoginButtonChanged(bool show_login_button);
108 void NotifyLogoutDialogDurationChanged(base::TimeDelta duration); 100 void NotifyLogoutDialogDurationChanged(base::TimeDelta duration);
109 void NotifySessionStartTimeChanged(); 101 void NotifySessionStartTimeChanged();
110 void NotifySessionLengthLimitChanged(); 102 void NotifySessionLengthLimitChanged();
111 void NotifyRequestToggleWifi(); 103 void NotifyRequestToggleWifi();
112 void NotifyOnCaptivePortalDetected(const std::string& service_path); 104 void NotifyOnCaptivePortalDetected(const std::string& service_path);
113 void NotifyEnterpriseDomainChanged(); 105 void NotifyEnterpriseDomainChanged();
114 void NotifyMediaCaptureChanged(); 106 void NotifyMediaCaptureChanged();
115 void NotifyScreenCaptureStart(const base::Closure& stop_callback, 107 void NotifyScreenCaptureStart(const base::Closure& stop_callback,
116 const base::string16& sharing_app_name); 108 const base::string16& sharing_app_name);
117 void NotifyScreenCaptureStop(); 109 void NotifyScreenCaptureStop();
118 void NotifyScreenShareStart(const base::Closure& stop_callback, 110 void NotifyScreenShareStart(const base::Closure& stop_callback,
119 const base::string16& helper_name); 111 const base::string16& helper_name);
120 void NotifyScreenShareStop(); 112 void NotifyScreenShareStop();
121 void NotifyLastWindowClosed(); 113 void NotifyLastWindowClosed();
122 #endif 114 #endif
123 115
124 private: 116 private:
125 base::ObserverList<AudioObserver> audio_observers_; 117 base::ObserverList<AudioObserver> audio_observers_;
126 base::ObserverList<LocaleObserver> locale_observers_;
127 base::ObserverList<TracingObserver> tracing_observers_; 118 base::ObserverList<TracingObserver> tracing_observers_;
128 base::ObserverList<UserObserver> user_observers_; 119 base::ObserverList<UserObserver> user_observers_;
129 #if defined(OS_CHROMEOS) 120 #if defined(OS_CHROMEOS)
130 base::ObserverList<BluetoothObserver> bluetooth_observers_; 121 base::ObserverList<BluetoothObserver> bluetooth_observers_;
131 base::ObserverList<LogoutButtonObserver> logout_button_observers_; 122 base::ObserverList<LogoutButtonObserver> logout_button_observers_;
132 base::ObserverList<SessionLengthLimitObserver> 123 base::ObserverList<SessionLengthLimitObserver>
133 session_length_limit_observers_; 124 session_length_limit_observers_;
134 base::ObserverList<NetworkObserver> network_observers_; 125 base::ObserverList<NetworkObserver> network_observers_;
135 base::ObserverList<NetworkPortalDetectorObserver> 126 base::ObserverList<NetworkPortalDetectorObserver>
136 network_portal_detector_observers_; 127 network_portal_detector_observers_;
137 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; 128 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
138 base::ObserverList<MediaCaptureObserver> media_capture_observers_; 129 base::ObserverList<MediaCaptureObserver> media_capture_observers_;
139 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; 130 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_;
140 base::ObserverList<ScreenShareObserver> screen_share_observers_; 131 base::ObserverList<ScreenShareObserver> screen_share_observers_;
141 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; 132 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_;
142 #endif 133 #endif
143 134
144 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); 135 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
145 }; 136 };
146 137
147 } // namespace ash 138 } // namespace ash
148 139
149 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 140 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698