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

Unified Diff: ash/aura/wm_shell_aura.cc

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal 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
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/aura/wm_window_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/aura/wm_window_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698