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

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

Issue 10454107: Revert 139494 - ash: Improved window maximize/restore animations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager.cc
===================================================================
--- ash/wm/workspace/workspace_manager.cc (revision 139956)
+++ ash/wm/workspace/workspace_manager.cc (working copy)
@@ -30,17 +30,13 @@
namespace {
-// Returns a list of all the windows with layers in |result|. Optionally
-// ignores the window |ignore_window|.
+// Returns a list of all the windows with layers in |result|.
void BuildWindowList(const std::vector<aura::Window*>& windows,
- aura::Window* ignore_window,
std::vector<aura::Window*>* result) {
for (size_t i = 0; i < windows.size(); ++i) {
- if (windows[i] == ignore_window)
- continue;
if (windows[i]->layer())
result->push_back(windows[i]);
- BuildWindowList(windows[i]->transient_children(), ignore_window, result);
+ BuildWindowList(windows[i]->transient_children(), result);
}
}
@@ -55,7 +51,7 @@
WorkspaceManager::WorkspaceManager(aura::Window* contents_view)
: contents_view_(contents_view),
active_workspace_(NULL),
- maximize_restore_window_(NULL),
+ ignored_window_(NULL),
grid_size_(0),
shelf_(NULL) {
DCHECK(contents_view);
@@ -216,7 +212,7 @@
AnimateChangeType change_type,
bool value) {
std::vector<aura::Window*> children;
- BuildWindowList(workspace->windows(), maximize_restore_window_, &children);
+ BuildWindowList(workspace->windows(), &children);
SetWindowLayerVisibility(children, change_type, value);
}
@@ -293,7 +289,9 @@
void WorkspaceManager::SetWindowBounds(aura::Window* window,
const gfx::Rect& bounds) {
+ ignored_window_ = window;
window->SetBounds(bounds);
+ ignored_window_ = NULL;
}
void WorkspaceManager::OnTypeOfWorkspacedNeededChanged(aura::Window* window) {
@@ -314,9 +312,7 @@
new_workspace = CreateWorkspace(Workspace::TYPE_MANAGED);
new_workspace->AddWindowAfter(window, NULL);
}
- maximize_restore_window_ = window;
SetActiveWorkspace(new_workspace);
- maximize_restore_window_ = NULL;
// Delete at the end so that we don't attempt to switch to another
// workspace in RemoveWorkspace().
CleanupWorkspace(current_workspace);
« no previous file with comments | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698