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

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

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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/locale/locale_notification_controller.cc
diff --git a/ash/system/locale/locale_notification_controller.cc b/ash/common/system/locale/locale_notification_controller.cc
similarity index 89%
rename from ash/system/locale/locale_notification_controller.cc
rename to ash/common/system/locale/locale_notification_controller.cc
index bc514d587704b49bc55bcf362b2b73d02c71849d..85fe5706ed433c981d97af62aa367cd484db57b2 100644
--- a/ash/system/locale/locale_notification_controller.cc
+++ b/ash/common/system/locale/locale_notification_controller.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/locale/locale_notification_controller.h"
+#include "ash/common/system/locale/locale_notification_controller.h"
#include <utility>
#include "ash/common/system/system_notifier.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_notifier.h"
+#include "ash/common/system/tray/wm_system_tray_notifier.h"
+#include "ash/common/wm_shell.h"
#include "base/strings/string16.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
@@ -47,12 +47,11 @@ class LocaleNotificationDelegate : public message_center::NotificationDelegate {
LocaleNotificationDelegate::LocaleNotificationDelegate(
LocaleObserver::Delegate* delegate)
- : delegate_(delegate) {
+ : delegate_(delegate) {
DCHECK(delegate_);
}
-LocaleNotificationDelegate::~LocaleNotificationDelegate() {
-}
+LocaleNotificationDelegate::~LocaleNotificationDelegate() {}
void LocaleNotificationDelegate::Close(bool by_user) {
delegate_->AcceptLocaleChange();
@@ -74,11 +73,11 @@ void LocaleNotificationDelegate::ButtonClick(int button_index) {
} // namespace
LocaleNotificationController::LocaleNotificationController() {
- Shell::GetInstance()->system_tray_notifier()->AddLocaleObserver(this);
+ WmShell::Get()->system_tray_notifier()->AddLocaleObserver(this);
}
LocaleNotificationController::~LocaleNotificationController() {
- Shell::GetInstance()->system_tray_notifier()->RemoveLocaleObserver(this);
+ WmShell::Get()->system_tray_notifier()->RemoveLocaleObserver(this);
}
void LocaleNotificationController::OnLocaleChanged(

Powered by Google App Engine
This is Rietveld 408576698