| Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
|
| diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
|
| index ab3f08b0d380a0ba4188fad0b00a5f95eabbbc87..7e5cda0b77fd62610274aba4fbca6c6990aa70d4 100644
|
| --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
|
| +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
|
| @@ -7,13 +7,14 @@
|
| #include "ash/common/ash_switches.h"
|
| #include "ash/common/session/session_state_delegate.h"
|
| #include "ash/common/shell_window_ids.h"
|
| +#include "ash/common/system/tray/system_tray_notifier.h"
|
| #include "ash/common/wm/window_state.h"
|
| +#include "ash/common/wm_shell.h"
|
| #include "ash/multi_profile_uma.h"
|
| #include "ash/root_window_controller.h"
|
| #include "ash/shelf/shelf.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_delegate.h"
|
| -#include "ash/system/tray/system_tray_notifier.h"
|
| #include "ash/wm/maximize_mode/maximize_mode_controller.h"
|
| #include "ash/wm/window_state_aura.h"
|
| #include "base/auto_reset.h"
|
| @@ -251,9 +252,10 @@ MultiUserWindowManagerChromeOS::~MultiUserWindowManagerChromeOS() {
|
| window = window_to_entry_.begin();
|
| }
|
|
|
| - if (ash::Shell::HasInstance())
|
| - ash::Shell::GetInstance()->session_state_delegate()->
|
| - RemoveSessionStateObserver(this);
|
| + if (ash::WmShell::HasInstance()) {
|
| + ash::WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(
|
| + this);
|
| + }
|
|
|
| // Remove all app observers.
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| @@ -282,9 +284,9 @@ void MultiUserWindowManagerChromeOS::Init() {
|
| account_id_to_app_observer_.end());
|
|
|
| // Add a session state observer to be able to monitor session changes.
|
| - if (ash::Shell::HasInstance()) {
|
| - ash::Shell::GetInstance()->session_state_delegate()->
|
| - AddSessionStateObserver(this);
|
| + if (ash::WmShell::HasInstance()) {
|
| + ash::WmShell::Get()->GetSessionStateDelegate()->AddSessionStateObserver(
|
| + this);
|
| }
|
|
|
| // The BrowserListObserver would have been better to use then the old
|
| @@ -352,8 +354,7 @@ void MultiUserWindowManagerChromeOS::ShowWindowForUser(
|
| previous_owner != current_account_id_)
|
| return;
|
|
|
| - ash::Shell::GetInstance()->session_state_delegate()->SwitchActiveUser(
|
| - account_id);
|
| + ash::WmShell::Get()->GetSessionStateDelegate()->SwitchActiveUser(account_id);
|
| }
|
|
|
| bool MultiUserWindowManagerChromeOS::AreWindowsSharedAmongUsers() const {
|
| @@ -445,9 +446,7 @@ void MultiUserWindowManagerChromeOS::ActiveUserChanged(
|
| this, account_id, GetAdjustedAnimationTimeInMS(kUserFadeTimeMS)));
|
| // Call notifier here instead of observing ActiveUserChanged because
|
| // this must happen after MultiUserWindowManagerChromeOS is notified.
|
| - ash::Shell::GetInstance()
|
| - ->system_tray_notifier()
|
| - ->NotifyMediaCaptureChanged();
|
| + ash::WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged();
|
| }
|
|
|
| void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) {
|
| @@ -618,7 +617,7 @@ void MultiUserWindowManagerChromeOS::SetWindowVisibility(
|
| account_id = GetUserPresentingWindow(owning_window);
|
| DCHECK(account_id.is_valid());
|
| }
|
| - ash::Shell::GetInstance()->session_state_delegate()->SwitchActiveUser(
|
| + ash::WmShell::Get()->GetSessionStateDelegate()->SwitchActiveUser(
|
| account_id);
|
| return;
|
| }
|
|
|