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

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

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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"
11 #include "ash/wm/workspace/magnetism_matcher.h" 11 #include "ash/wm/workspace/magnetism_matcher.h"
12 #include "ash/wm/workspace/snap_types.h" 12 #include "ash/wm/workspace/snap_types.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "ui/aura/window_tracker.h" 17 #include "ui/aura/window_tracker.h"
18 18
19 namespace ash { 19 namespace ash {
20 namespace wm {
21 class WindowState;
22 }
23
20 namespace internal { 24 namespace internal {
21 25
22 class DockedWindowLayoutManager; 26 class DockedWindowLayoutManager;
23 class PhantomWindowController; 27 class PhantomWindowController;
24 class SnapSizer; 28 class SnapSizer;
25 class WindowSize; 29 class WindowSize;
26 30
27 // WindowResizer implementation for workspaces. This enforces that windows are 31 // WindowResizer implementation for workspaces. This enforces that windows are
28 // 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
29 // 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
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // Returns the SnapType for the specified point. SNAP_NONE is used if no 160 // Returns the SnapType for the specified point. SNAP_NONE is used if no
157 // snapping should be used. 161 // snapping should be used.
158 SnapType GetSnapType(const gfx::Point& location) const; 162 SnapType GetSnapType(const gfx::Point& location) const;
159 163
160 // Dock when a window is at its last step in snapping sequence, undock 164 // Dock when a window is at its last step in snapping sequence, undock
161 // otherwise. 165 // otherwise.
162 void UpdateDockedState(bool is_docked); 166 void UpdateDockedState(bool is_docked);
163 167
164 aura::Window* window() const { return details_.window; } 168 aura::Window* window() const { return details_.window; }
165 169
170 wm::WindowState* window_state() { return details_.window_state; }
171
166 const Details details_; 172 const Details details_;
167 173
168 const std::vector<aura::Window*> attached_windows_; 174 const std::vector<aura::Window*> attached_windows_;
169 175
170 // Set to true once Drag() is invoked and the bounds of the window change. 176 // Set to true once Drag() is invoked and the bounds of the window change.
171 bool did_move_or_resize_; 177 bool did_move_or_resize_;
172 178
173 // The initial size of each of the windows in |attached_windows_| along the 179 // The initial size of each of the windows in |attached_windows_| along the
174 // primary axis. 180 // primary axis.
175 std::vector<int> initial_size_; 181 std::vector<int> initial_size_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // gets dragged into another browser window. 221 // gets dragged into another browser window.
216 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; 222 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
217 223
218 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 224 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
219 }; 225 };
220 226
221 } // namespace internal 227 } // namespace internal
222 } // namespace ash 228 } // namespace ash
223 229
224 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 230 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698