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

Side by Side Diff: ash/common/system/locale/locale_notification_controller.h

Issue 2420753002: ash: Use mojo LocaleNotificationController interface. (Closed)
Patch Set: Remove dead code + cl lint Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 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 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_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ 5 #ifndef ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
6 #define ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ 6 #define ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/common/system/locale/locale_observer.h" 10 #include "ash/public/interfaces/locale.mojom.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "mojo/public/cpp/bindings/binding_set.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 // Observes the locale change and creates rich notification for the change. 16 // Observes the locale change and creates rich notification for the change.
16 class LocaleNotificationController : public LocaleObserver { 17 class LocaleNotificationController
18 : public mojom::LocaleNotificationController {
17 public: 19 public:
18 LocaleNotificationController(); 20 LocaleNotificationController();
19 ~LocaleNotificationController() override; 21 ~LocaleNotificationController() override;
20 22
23 void BindRequest(mojom::LocaleNotificationControllerRequest request);
msw 2016/10/14 01:46:29 nit: comment (copy from ShelfController or similar
24
21 private: 25 private:
22 // Overridden from LocaleObserver. 26 // Overridden from mojom::LocaleNotificationController:
23 void OnLocaleChanged(LocaleObserver::Delegate* delegate, 27 void NotifyLocaleChanged(
msw 2016/10/14 01:46:29 Keep the name as OnLocaleChanged (it's a handler t
24 const std::string& cur_locale, 28 const std::string& cur_locale,
25 const std::string& from_locale, 29 const std::string& from_locale,
26 const std::string& to_locale) override; 30 const std::string& to_locale,
31 const NotifyLocaleChangedCallback& callback) override;
27 32
28 std::string cur_locale_; 33 std::string cur_locale_;
29 std::string from_locale_; 34 std::string from_locale_;
30 std::string to_locale_; 35 std::string to_locale_;
31 36
37 // Bindings for the LocaleNotificationController interface.
38 mojo::BindingSet<mojom::LocaleNotificationController> bindings_;
39
32 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController); 40 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController);
33 }; 41 };
34 42
35 } // namespace ash 43 } // namespace ash
36 44
37 #endif // ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ 45 #endif // ASH_COMMON_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698