| Index: ash/aura/wm_shell_aura.cc
|
| diff --git a/ash/aura/wm_shell_aura.cc b/ash/aura/wm_shell_aura.cc
|
| index 7e5c93a1b2f563402bb04ab0f1e47228ca9f4829..1b099114526653ce936be9382dbbd52ef2ba8fc2 100644
|
| --- a/ash/aura/wm_shell_aura.cc
|
| +++ b/ash/aura/wm_shell_aura.cc
|
| @@ -29,10 +29,10 @@ WmShellAura::WmShellAura() {
|
|
|
| WmShellAura::~WmShellAura() {
|
| WmShell::Set(nullptr);
|
| - if (added_activation_observer_) {
|
| - aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
|
| - ->RemoveObserver(this);
|
| - }
|
| +
|
| + if (added_activation_observer_)
|
| + Shell::GetInstance()->activation_client()->RemoveObserver(this);
|
| +
|
| if (added_display_observer_)
|
| Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this);
|
|
|
| @@ -70,13 +70,17 @@ WmWindow* WmShellAura::GetRootWindowForNewWindows() {
|
| }
|
|
|
| std::vector<WmWindow*> WmShellAura::GetMruWindowList() {
|
| - return WmWindowAura::FromAuraWindows(
|
| - Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList());
|
| + // TODO(sky): remove this and provide accessor for MruWindowTracker.
|
| + // http://crbug.com/617789.
|
| + return Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList();
|
| }
|
|
|
| std::vector<WmWindow*> WmShellAura::GetMruWindowListIgnoreModals() {
|
| - return WmWindowAura::FromAuraWindows(
|
| - Shell::GetInstance()->mru_window_tracker()->BuildWindowListIgnoreModal());
|
| + // TODO(sky): remove this and provide accessor for MruWindowTracker.
|
| + // http://crbug.com/617789.
|
| + return Shell::GetInstance()
|
| + ->mru_window_tracker()
|
| + ->BuildWindowListIgnoreModal();
|
| }
|
|
|
| bool WmShellAura::IsForceMaximizeOnFirstRun() {
|
| @@ -91,6 +95,11 @@ bool WmShellAura::IsScreenLocked() {
|
| return Shell::GetInstance()->session_state_delegate()->IsScreenLocked();
|
| }
|
|
|
| +bool WmShellAura::CanShowWindowForUser(WmWindow* window) {
|
| + return Shell::GetInstance()->delegate()->CanShowWindowForUser(
|
| + WmWindowAura::GetAuraWindow(window));
|
| +}
|
| +
|
| void WmShellAura::LockCursor() {
|
| Shell::GetInstance()->cursor_manager()->LockCursor();
|
| }
|
| @@ -135,8 +144,7 @@ bool WmShellAura::IsOverviewModeRestoringMinimizedWindows() {
|
| void WmShellAura::AddActivationObserver(WmActivationObserver* observer) {
|
| if (!added_activation_observer_) {
|
| added_activation_observer_ = true;
|
| - aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
|
| - ->AddObserver(this);
|
| + Shell::GetInstance()->activation_client()->AddObserver(this);
|
| }
|
| activation_observers_.AddObserver(observer);
|
| }
|
|
|