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

Side by Side Diff: ash/common/system/tray/wm_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 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 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
10 #include "ash/common/system/locale/locale_observer.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/observer_list.h" 12 #include "base/observer_list.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 class AccessibilityObserver; 16 class AccessibilityObserver;
16 class ClockObserver; 17 class ClockObserver;
17 class IMEObserver; 18 class IMEObserver;
18 struct UpdateInfo; 19 struct UpdateInfo;
19 class UpdateObserver; 20 class UpdateObserver;
(...skipping 25 matching lines...) Expand all
45 void NotifyDateFormatChanged(); 46 void NotifyDateFormatChanged();
46 void NotifySystemClockTimeUpdated(); 47 void NotifySystemClockTimeUpdated();
47 void NotifySystemClockCanSetTimeChanged(bool can_set_time); 48 void NotifySystemClockCanSetTimeChanged(bool can_set_time);
48 49
49 // Input methods. 50 // Input methods.
50 void AddIMEObserver(IMEObserver* observer); 51 void AddIMEObserver(IMEObserver* observer);
51 void RemoveIMEObserver(IMEObserver* observer); 52 void RemoveIMEObserver(IMEObserver* observer);
52 void NotifyRefreshIME(); 53 void NotifyRefreshIME();
53 void NotifyRefreshIMEMenu(bool is_active); 54 void NotifyRefreshIMEMenu(bool is_active);
54 55
56 // Locale.
57 void AddLocaleObserver(LocaleObserver* observer);
58 void RemoveLocaleObserver(LocaleObserver* observer);
59 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
60 const std::string& cur_locale,
61 const std::string& from_locale,
62 const std::string& to_locale);
63
55 // OS updates. 64 // OS updates.
56 void AddUpdateObserver(UpdateObserver* observer); 65 void AddUpdateObserver(UpdateObserver* observer);
57 void RemoveUpdateObserver(UpdateObserver* observer); 66 void RemoveUpdateObserver(UpdateObserver* observer);
58 void NotifyUpdateRecommended(const UpdateInfo& info); 67 void NotifyUpdateRecommended(const UpdateInfo& info);
59 68
60 #if defined(OS_CHROMEOS) 69 #if defined(OS_CHROMEOS)
61 // Virtual keyboard. 70 // Virtual keyboard.
62 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); 71 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer);
63 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); 72 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer);
64 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); 73 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed);
65 #endif 74 #endif
66 75
67 private: 76 private:
68 base::ObserverList<AccessibilityObserver> accessibility_observers_; 77 base::ObserverList<AccessibilityObserver> accessibility_observers_;
78 base::ObserverList<ClockObserver> clock_observers_;
James Cook 2016/06/22 02:53:29 thanks for fixing this ordering
69 base::ObserverList<IMEObserver> ime_observers_; 79 base::ObserverList<IMEObserver> ime_observers_;
70 base::ObserverList<ClockObserver> clock_observers_; 80 base::ObserverList<LocaleObserver> locale_observers_;
71 base::ObserverList<UpdateObserver> update_observers_; 81 base::ObserverList<UpdateObserver> update_observers_;
72 82
73 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
74 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; 84 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_;
75 #endif 85 #endif
76 86
77 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); 87 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier);
78 }; 88 };
79 89
80 } // namespace ash 90 } // namespace ash
81 91
82 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 92 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/common/system/locale/locale_observer.h ('k') | ash/common/system/tray/wm_system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698