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

Unified Diff: chrome/browser/notifications/login_state_notification_blocker_chromeos.cc

Issue 2739763003: Moves maintaining ShellObservers back to Shell (Closed)
Patch Set: Created 3 years, 9 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: chrome/browser/notifications/login_state_notification_blocker_chromeos.cc
diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos.cc b/chrome/browser/notifications/login_state_notification_blocker_chromeos.cc
index 6b74bf0359c3b3c347e005a2509a162d50db2211..cfe8407bc249b732571c1770042293d104d566fd 100644
--- a/chrome/browser/notifications/login_state_notification_blocker_chromeos.cc
+++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/notifications/login_state_notification_blocker_chromeos.h"
#include "ash/common/system/system_notifier.h"
-#include "ash/common/wm_shell.h"
#include "ash/root_window_controller.h"
+#include "ash/shell.h"
#include "ash/wm/window_properties.h"
#include "chrome/browser/chrome_notification_types.h"
#include "content/public/browser/notification_service.h"
@@ -23,8 +23,8 @@ LoginStateNotificationBlockerChromeOS::LoginStateNotificationBlockerChromeOS(
// when a notification is created, so ash::Shell should be initialized, except
// when running as a mus client (ash::Shell is not initialized when that is
// the case).
- if (ash::WmShell::HasInstance())
- ash::WmShell::Get()->AddShellObserver(this);
+ if (ash::Shell::HasInstance())
+ ash::Shell::GetInstance()->AddShellObserver(this);
// LoginState may not exist in some tests.
if (chromeos::LoginState::IsInitialized())
@@ -39,8 +39,8 @@ LoginStateNotificationBlockerChromeOS::
if (chromeos::LoginState::IsInitialized())
chromeos::LoginState::Get()->RemoveObserver(this);
if (observing_) {
- if (ash::WmShell::HasInstance())
- ash::WmShell::Get()->RemoveShellObserver(this);
+ if (ash::Shell::HasInstance())
+ ash::Shell::GetInstance()->RemoveShellObserver(this);
chromeos::UserAddingScreen::Get()->RemoveObserver(this);
}
}
@@ -68,8 +68,8 @@ void LoginStateNotificationBlockerChromeOS::OnLockStateChanged(bool locked) {
}
void LoginStateNotificationBlockerChromeOS::OnAppTerminating() {
- if (ash::WmShell::HasInstance())
- ash::WmShell::Get()->RemoveShellObserver(this);
+ if (ash::Shell::HasInstance())
+ ash::Shell::GetInstance()->RemoveShellObserver(this);
chromeos::UserAddingScreen::Get()->RemoveObserver(this);
observing_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698