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

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: Fixed merge problems with trunk 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
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 // Show a phantom window for dragging in another root window. 295 // Show a phantom window for dragging in another root window.
296 if (HasSecondaryRootWindow()) 296 if (HasSecondaryRootWindow())
297 UpdateDragPhantomWindow(bounds, in_original_root); 297 UpdateDragPhantomWindow(bounds, in_original_root);
298 else 298 else
299 drag_phantom_window_controller_.reset(); 299 drag_phantom_window_controller_.reset();
300 300
301 } 301 }
302 302
303 void WorkspaceWindowResizer::CompleteDrag(int event_flags) { 303 void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
304 wm::SetUserHasChangedWindowPositionOrSize(details_.window, true);
304 window()->layer()->SetOpacity(details_.initial_opacity); 305 window()->layer()->SetOpacity(details_.initial_opacity);
305 drag_phantom_window_controller_.reset(); 306 drag_phantom_window_controller_.reset();
306 snap_phantom_window_controller_.reset(); 307 snap_phantom_window_controller_.reset();
307 if (!did_move_or_resize_ || details_.window_component != HTCAPTION) 308 if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
308 return; 309 return;
309 310
310 if (snap_type_ == SNAP_LEFT_EDGE || snap_type_ == SNAP_RIGHT_EDGE) { 311 if (snap_type_ == SNAP_LEFT_EDGE || snap_type_ == SNAP_RIGHT_EDGE) {
311 if (!GetRestoreBoundsInScreen(window())) 312 if (!GetRestoreBoundsInScreen(window()))
312 SetRestoreBoundsInParent(window(), details_.restore_bounds.IsEmpty() ? 313 SetRestoreBoundsInParent(window(), details_.restore_bounds.IsEmpty() ?
313 details_.initial_bounds : 314 details_.initial_bounds :
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 gfx::Rect layer_bounds = layer_->bounds(); 810 gfx::Rect layer_bounds = layer_->bounds();
810 layer_bounds.set_origin(gfx::Point(0, 0)); 811 layer_bounds.set_origin(gfx::Point(0, 0));
811 layer_->SetBounds(layer_bounds); 812 layer_->SetBounds(layer_bounds);
812 layer_->SetVisible(false); 813 layer_->SetVisible(false);
813 // Detach it from the current container. 814 // Detach it from the current container.
814 layer_->parent()->Remove(layer_); 815 layer_->parent()->Remove(layer_);
815 } 816 }
816 817
817 } // namespace internal 818 } // namespace internal
818 } // namespace ash 819 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698