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

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

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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 "ash/common/wm_window_tracker.h"
16 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
17 #include "base/macros.h" 16 #include "base/macros.h"
18 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "ui/aura/window_tracker.h"
19 19
20 namespace ash { 20 namespace ash {
21 class DockedWindowLayoutManager; 21 class DockedWindowLayoutManager;
22 class PhantomWindowController; 22 class PhantomWindowController;
23 class TwoStepEdgeCycler; 23 class TwoStepEdgeCycler;
24 class WindowSize; 24 class WindowSize;
25 class WmShell;
25 26
26 namespace wm { 27 namespace wm {
27 class WindowState; 28 class WindowState;
28 class WmShell;
29 } 29 }
30 30
31 // WindowResizer implementation for workspaces. This enforces that windows are 31 // WindowResizer implementation for workspaces. This enforces that windows are
32 // not allowed to vertically move or resize outside of the work area. As windows 32 // not allowed to vertically move or resize outside of the work area. As windows
33 // are moved outside the work area they are shrunk. We remember the height of 33 // are moved outside the work area they are shrunk. We remember the height of
34 // the window before it was moved so that if the window is again moved up we 34 // the window before it was moved so that if the window is again moved up we
35 // attempt to restore the old height. 35 // attempt to restore the old height.
36 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { 36 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
37 public: 37 public:
38 // When dragging an attached window this is the min size we'll make sure is 38 // When dragging an attached window this is the min size we'll make sure is
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // the screen. 202 // the screen.
203 int num_mouse_moves_since_bounds_change_; 203 int num_mouse_moves_since_bounds_change_;
204 204
205 // The mouse location passed to Drag(). 205 // The mouse location passed to Drag().
206 gfx::Point last_mouse_location_; 206 gfx::Point last_mouse_location_;
207 207
208 // Window the drag has magnetically attached to. 208 // Window the drag has magnetically attached to.
209 WmWindow* magnetism_window_; 209 WmWindow* magnetism_window_;
210 210
211 // Used to verify |magnetism_window_| is still valid. 211 // Used to verify |magnetism_window_| is still valid.
212 WmWindowTracker window_tracker_; 212 aura::WindowTracker window_tracker_;
213 213
214 // If |magnetism_window_| is non-NULL this indicates how the two windows 214 // If |magnetism_window_| is non-NULL this indicates how the two windows
215 // should attach. 215 // should attach.
216 MatchedEdge magnetism_edge_; 216 MatchedEdge magnetism_edge_;
217 217
218 // Dock container window layout manager. 218 // Dock container window layout manager.
219 DockedWindowLayoutManager* dock_layout_; 219 DockedWindowLayoutManager* dock_layout_;
220 220
221 // Used to determine if this has been deleted during a drag such as when a tab 221 // Used to determine if this has been deleted during a drag such as when a tab
222 // gets dragged into another browser window. 222 // gets dragged into another browser window.
223 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; 223 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
224 224
225 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 225 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
226 }; 226 };
227 227
228 } // namespace ash 228 } // namespace ash
229 229
230 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ 230 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/common/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698