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

Unified Diff: ash/wm/aura/wm_globals_aura.cc

Issue 2012343002: Converts overview to use common ash types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 7 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/wm/aura/wm_globals_aura.cc
diff --git a/ash/wm/aura/wm_globals_aura.cc b/ash/wm/aura/wm_globals_aura.cc
index 17f107bd1910d5043d65b615e115cd6ac4dea6f7..6a81a58a796d08a86b4b437b095235a6dae7d7f0 100644
--- a/ash/wm/aura/wm_globals_aura.cc
+++ b/ash/wm/aura/wm_globals_aura.cc
@@ -50,6 +50,10 @@ WmWindow* WmGlobalsAura::GetActiveWindow() {
return WmWindowAura::Get(wm::GetActiveWindow());
}
+WmWindow* WmGlobalsAura::GetPrimaryRootWindow() {
+ return WmWindowAura::Get(Shell::GetPrimaryRootWindow());
+}
+
WmWindow* WmGlobalsAura::GetRootWindowForDisplayId(int64_t display_id) {
return WmWindowAura::Get(Shell::GetInstance()
->window_tree_host_manager()
@@ -60,14 +64,15 @@ WmWindow* WmGlobalsAura::GetRootWindowForNewWindows() {
return WmWindowAura::Get(Shell::GetTargetRootWindow());
}
+std::vector<WmWindow*> WmGlobalsAura::GetMruWindowList() {
+ return WmWindowAura::FromAuraWindows(
+ ash::Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList());
James Cook 2016/05/27 00:02:50 nit: no need for ash:: here or below
sky 2016/05/27 03:18:03 Done.
+}
+
std::vector<WmWindow*> WmGlobalsAura::GetMruWindowListIgnoreModals() {
- const std::vector<aura::Window*> windows = ash::Shell::GetInstance()
- ->mru_window_tracker()
- ->BuildWindowListIgnoreModal();
- std::vector<WmWindow*> wm_windows(windows.size());
- for (size_t i = 0; i < windows.size(); ++i)
- wm_windows[i] = WmWindowAura::Get(windows[i]);
- return wm_windows;
+ return WmWindowAura::FromAuraWindows(ash::Shell::GetInstance()
+ ->mru_window_tracker()
+ ->BuildWindowListIgnoreModal());
}
bool WmGlobalsAura::IsForceMaximizeOnFirstRun() {
@@ -166,6 +171,14 @@ void WmGlobalsAura::OnWindowActivated(
WmWindowAura::Get(lost_active)));
}
+void WmGlobalsAura::OnAttemptToReactivateWindow(aura::Window* request_active,
+ aura::Window* actual_active) {
+ FOR_EACH_OBSERVER(
+ WmActivationObserver, activation_observers_,
+ OnAttemptToReactivateWindow(WmWindowAura::Get(request_active),
+ WmWindowAura::Get(actual_active)));
+}
+
void WmGlobalsAura::OnDisplayConfigurationChanging() {
FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
OnDisplayConfigurationChanging());

Powered by Google App Engine
This is Rietveld 408576698