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

Unified Diff: ash/common/system/locale/locale_notification_controller.h

Issue 2420753002: ash: Use mojo LocaleNotificationController interface. (Closed)
Patch Set: Uniquify callbacks 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/locale/locale_notification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/locale/locale_notification_controller.h
diff --git a/ash/common/system/locale/locale_notification_controller.h b/ash/common/system/locale/locale_notification_controller.h
index 24f27a6fdb2cee220aa9be3d90e615a40de7c93a..b97c7ed8ab244698ce65f3997983aec51b4742f1 100644
--- a/ash/common/system/locale/locale_notification_controller.h
+++ b/ash/common/system/locale/locale_notification_controller.h
@@ -7,28 +7,37 @@
#include <string>
-#include "ash/common/system/locale/locale_observer.h"
+#include "ash/public/interfaces/locale.mojom.h"
#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
namespace ash {
// Observes the locale change and creates rich notification for the change.
-class LocaleNotificationController : public LocaleObserver {
+class LocaleNotificationController
+ : public mojom::LocaleNotificationController {
public:
LocaleNotificationController();
~LocaleNotificationController() override;
+ // Binds the mojom::LocaleNotificationController interface request to this
+ // object.
+ void BindRequest(mojom::LocaleNotificationControllerRequest request);
+
private:
- // Overridden from LocaleObserver.
- void OnLocaleChanged(LocaleObserver::Delegate* delegate,
- const std::string& cur_locale,
+ // Overridden from mojom::LocaleNotificationController:
+ void OnLocaleChanged(const std::string& cur_locale,
const std::string& from_locale,
- const std::string& to_locale) override;
+ const std::string& to_locale,
+ const OnLocaleChangedCallback& callback) override;
std::string cur_locale_;
std::string from_locale_;
std::string to_locale_;
+ // Bindings for the LocaleNotificationController interface.
+ mojo::BindingSet<mojom::LocaleNotificationController> bindings_;
+
DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController);
};
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/locale/locale_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698