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

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

Issue 10835047: Allow the cursor to warp even when a window is dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: do not move modal windows to another display Created 8 years, 4 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 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 #ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/wm/window_resizer.h" 10 #include "ash/wm/window_resizer.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const std::vector<aura::Window*>& attached_windows); 42 const std::vector<aura::Window*>& attached_windows);
43 43
44 // Returns true if the drag will result in changing the window in anyway. 44 // Returns true if the drag will result in changing the window in anyway.
45 bool is_resizable() const { return details_.is_resizable; } 45 bool is_resizable() const { return details_.is_resizable; }
46 46
47 const gfx::Point& initial_location_in_parent() const { 47 const gfx::Point& initial_location_in_parent() const {
48 return details_.initial_location_in_parent; 48 return details_.initial_location_in_parent;
49 } 49 }
50 50
51 // Overridden from WindowResizer: 51 // Overridden from WindowResizer:
52 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; 52 virtual void Drag(const gfx::Point& location_in_screen,
53 int event_flags) OVERRIDE;
53 virtual void CompleteDrag(int event_flags) OVERRIDE; 54 virtual void CompleteDrag(int event_flags) OVERRIDE;
54 virtual void RevertDrag() OVERRIDE; 55 virtual void RevertDrag() OVERRIDE;
55 56
56 private: 57 private:
57 WorkspaceWindowResizer(const Details& details, 58 WorkspaceWindowResizer(const Details& details,
58 const std::vector<aura::Window*>& attached_windows); 59 const std::vector<aura::Window*>& attached_windows);
59 60
60 private: 61 private:
61 // Type of snapping. 62 // Type of snapping.
62 enum SnapType { 63 enum SnapType {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 int grid_size); 113 int grid_size);
113 114
114 // Restacks the windows z-order position so that one of the windows is at the 115 // Restacks the windows z-order position so that one of the windows is at the
115 // top of the z-order, and the rest directly underneath it. 116 // top of the z-order, and the rest directly underneath it.
116 void RestackWindows(); 117 void RestackWindows();
117 118
118 // Returns the SnapType for the specified point. SNAP_NONE is used if no 119 // Returns the SnapType for the specified point. SNAP_NONE is used if no
119 // snapping should be used. 120 // snapping should be used.
120 SnapType GetSnapType(const gfx::Point& location) const; 121 SnapType GetSnapType(const gfx::Point& location) const;
121 122
123 // Returns true if we should allow the cursor to warp.
124 bool ShouldAllowCursorWarp() const;
125
122 aura::Window* window() const { return details_.window; } 126 aura::Window* window() const { return details_.window; }
123 127
124 const Details details_; 128 const Details details_;
125 129
126 const std::vector<aura::Window*> attached_windows_; 130 const std::vector<aura::Window*> attached_windows_;
127 131
128 // Set to true once Drag() is invoked and the bounds of the window change. 132 // Set to true once Drag() is invoked and the bounds of the window change.
129 bool did_move_or_resize_; 133 bool did_move_or_resize_;
130 134
131 // The initial size of each of the windows in |attached_windows_| along the 135 // The initial size of each of the windows in |attached_windows_| along the
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // the screen. 171 // the screen.
168 int num_mouse_moves_since_bounds_change_; 172 int num_mouse_moves_since_bounds_change_;
169 173
170 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 174 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
171 }; 175 };
172 176
173 } // namespace internal 177 } // namespace internal
174 } // namespace ash 178 } // namespace ash
175 179
176 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 180 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698