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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a part of the change which slipped in through a branch switch and eclipse usage 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_manager2_unittest.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 306 }
307 // Show a phantom window for dragging in another root window. 307 // Show a phantom window for dragging in another root window.
308 if (HasSecondaryRootWindow()) 308 if (HasSecondaryRootWindow())
309 UpdateDragPhantomWindow(bounds, in_original_root); 309 UpdateDragPhantomWindow(bounds, in_original_root);
310 else 310 else
311 drag_phantom_window_controller_.reset(); 311 drag_phantom_window_controller_.reset();
312 312
313 } 313 }
314 314
315 void WorkspaceWindowResizer::CompleteDrag(int event_flags) { 315 void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
316 wm::SetUserHasChangedWindowPositionOrSize(details_.window, true);
316 window()->layer()->SetOpacity(details_.initial_opacity); 317 window()->layer()->SetOpacity(details_.initial_opacity);
317 drag_phantom_window_controller_.reset(); 318 drag_phantom_window_controller_.reset();
318 snap_phantom_window_controller_.reset(); 319 snap_phantom_window_controller_.reset();
319 if (!did_move_or_resize_ || details_.window_component != HTCAPTION) 320 if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
320 return; 321 return;
321 322
322 // When the window is not in the normal show state, we do not snap thw window. 323 // When the window is not in the normal show state, we do not snap thw window.
323 // This happens when the user minimizes or maximizes the window by keyboard 324 // This happens when the user minimizes or maximizes the window by keyboard
324 // shortcut while dragging it. If the window is the result of dragging a tab 325 // shortcut while dragging it. If the window is the result of dragging a tab
325 // out of a maximized window, it's already in the normal show state when this 326 // out of a maximized window, it's already in the normal show state when this
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 gfx::Rect layer_bounds = layer_->bounds(); 828 gfx::Rect layer_bounds = layer_->bounds();
828 layer_bounds.set_origin(gfx::Point(0, 0)); 829 layer_bounds.set_origin(gfx::Point(0, 0));
829 layer_->SetBounds(layer_bounds); 830 layer_->SetBounds(layer_bounds);
830 layer_->SetVisible(false); 831 layer_->SetVisible(false);
831 // Detach it from the current container. 832 // Detach it from the current container.
832 layer_->parent()->Remove(layer_); 833 layer_->parent()->Remove(layer_);
833 } 834 }
834 835
835 } // namespace internal 836 } // namespace internal
836 } // namespace ash 837 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager2_unittest.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698