OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ | |
6 #define ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "ash/public/interfaces/locale.mojom.h" | |
11 #include "base/macros.h" | |
12 #include "mojo/public/cpp/bindings/binding_set.h" | |
13 | |
14 namespace ash { | |
15 | |
16 // Observes the locale change and creates rich notification for the change. | |
17 class LocaleNotificationController | |
18 : public mojom::LocaleNotificationController { | |
19 public: | |
20 LocaleNotificationController(); | |
21 ~LocaleNotificationController() override; | |
22 | |
23 // Binds the mojom::LocaleNotificationController interface request to this | |
24 // object. | |
25 void BindRequest(mojom::LocaleNotificationControllerRequest request); | |
26 | |
27 private: | |
28 // Overridden from mojom::LocaleNotificationController: | |
29 void OnLocaleChanged(const std::string& cur_locale, | |
30 const std::string& from_locale, | |
31 const std::string& to_locale, | |
32 const OnLocaleChangedCallback& callback) override; | |
33 | |
34 std::string cur_locale_; | |
35 std::string from_locale_; | |
36 std::string to_locale_; | |
37 | |
38 // Bindings for the LocaleNotificationController interface. | |
39 mojo::BindingSet<mojom::LocaleNotificationController> bindings_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController); | |
42 }; | |
43 | |
44 } // namespace ash | |
45 | |
46 #endif // ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ | |
OLD | NEW |