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

Unified Diff: ash/wm/workspace/workspace.cc

Issue 11417150: Implement workspace scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/workspace/workspace.cc
diff --git a/ash/wm/workspace/workspace.cc b/ash/wm/workspace/workspace.cc
index a2c03254b97e8606c15f5c9807a6ffd5e09057d9..a19d5329e891f90745af899cd0ac2a2f6842ef36 100644
--- a/ash/wm/workspace/workspace.cc
+++ b/ash/wm/workspace/workspace.cc
@@ -58,7 +58,22 @@ aura::Window* Workspace::ReleaseWindow() {
return window;
}
-bool Workspace::ShouldMoveToPending() const {
+aura::Window* Workspace::GetActiveWindow() const {
+ aura::Window* active_window = wm::GetActiveWindow();
+ if (!active_window)
sky 2012/11/26 23:20:49 return window_->Contains(active_window) ? active_w
+ return NULL;
+
+ // Only return the active window if it is in this workspace.
+ aura::Window* window = active_window;
+ while (window) {
+ if (window == window_)
+ return active_window;
+ window = window->parent();
+ }
+ return NULL;
+}
+
+bool Workspace::ShouldMoveToHidden() const {
if (!is_maximized_)
return false;

Powered by Google App Engine
This is Rietveld 408576698