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

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

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: oshima + mfomitchev comments Created 3 years, 9 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
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_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ 5 #ifndef ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_
6 #define ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ 6 #define ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/common/wm/window_resizer.h" 13 #include "ash/common/wm/window_resizer.h"
14 #include "ash/common/wm/workspace/magnetism_matcher.h" 14 #include "ash/common/wm/workspace/magnetism_matcher.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "ui/aura/window_tracker.h" 18 #include "ui/aura/window_tracker.h"
19 19
20 namespace ash { 20 namespace ash {
21 class DockedWindowLayoutManager;
22 class PhantomWindowController; 21 class PhantomWindowController;
23 class TwoStepEdgeCycler; 22 class TwoStepEdgeCycler;
24 class WindowSize; 23 class WindowSize;
25 class WmShell; 24 class WmShell;
26 25
27 namespace wm { 26 namespace wm {
28 class WindowState; 27 class WindowState;
29 } 28 }
30 29
31 // WindowResizer implementation for workspaces. This enforces that windows are 30 // WindowResizer implementation for workspaces. This enforces that windows are
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Returns the edge to which the window should be snapped to if the user does 148 // Returns the edge to which the window should be snapped to if the user does
150 // no more dragging. SNAP_NONE is returned if the window should not be 149 // no more dragging. SNAP_NONE is returned if the window should not be
151 // snapped. 150 // snapped.
152 SnapType GetSnapType(const gfx::Point& location) const; 151 SnapType GetSnapType(const gfx::Point& location) const;
153 152
154 // Returns true if |bounds_in_parent| are valid bounds for snapped state type 153 // Returns true if |bounds_in_parent| are valid bounds for snapped state type
155 // |snapped_type|. 154 // |snapped_type|.
156 bool AreBoundsValidSnappedBounds(wm::WindowStateType snapped_type, 155 bool AreBoundsValidSnappedBounds(wm::WindowStateType snapped_type,
157 const gfx::Rect& bounds_in_parent) const; 156 const gfx::Rect& bounds_in_parent) const;
158 157
159 // Docks or undocks the dragged window.
160 void SetDraggedWindowDocked(bool should_dock);
161
162 wm::WindowState* window_state() { return window_state_; } 158 wm::WindowState* window_state() { return window_state_; }
163 159
164 const std::vector<WmWindow*> attached_windows_; 160 const std::vector<WmWindow*> attached_windows_;
165 161
166 WmShell* shell_; 162 WmShell* shell_;
167 163
168 // Returns the currently used instance for test. 164 // Returns the currently used instance for test.
169 static WorkspaceWindowResizer* GetInstanceForTest(); 165 static WorkspaceWindowResizer* GetInstanceForTest();
170 166
171 bool did_lock_cursor_; 167 bool did_lock_cursor_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // Window the drag has magnetically attached to. 204 // Window the drag has magnetically attached to.
209 WmWindow* magnetism_window_; 205 WmWindow* magnetism_window_;
210 206
211 // Used to verify |magnetism_window_| is still valid. 207 // Used to verify |magnetism_window_| is still valid.
212 aura::WindowTracker window_tracker_; 208 aura::WindowTracker window_tracker_;
213 209
214 // If |magnetism_window_| is non-NULL this indicates how the two windows 210 // If |magnetism_window_| is non-NULL this indicates how the two windows
215 // should attach. 211 // should attach.
216 MatchedEdge magnetism_edge_; 212 MatchedEdge magnetism_edge_;
217 213
218 // Dock container window layout manager.
219 DockedWindowLayoutManager* dock_layout_;
220
221 // Used to determine if this has been deleted during a drag such as when a tab 214 // Used to determine if this has been deleted during a drag such as when a tab
222 // gets dragged into another browser window. 215 // gets dragged into another browser window.
223 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; 216 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
224 217
225 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 218 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
226 }; 219 };
227 220
228 } // namespace ash 221 } // namespace ash
229 222
230 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ 223 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698