OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/wm/window_resizer.h" | 11 #include "ash/wm/window_resizer.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 | 14 |
| 15 namespace aura { |
| 16 namespace shared { |
| 17 class RootWindowEventFilter; |
| 18 } |
| 19 } |
| 20 |
15 namespace ash { | 21 namespace ash { |
16 namespace internal { | 22 namespace internal { |
17 | 23 |
18 class PhantomWindowController; | 24 class PhantomWindowController; |
19 class RootWindowEventFilter; | |
20 class SnapSizer; | 25 class SnapSizer; |
21 | 26 |
22 // WindowResizer implementation for workspaces. This enforces that windows are | 27 // WindowResizer implementation for workspaces. This enforces that windows are |
23 // not allowed to vertically move or resize outside of the work area. As windows | 28 // not allowed to vertically move or resize outside of the work area. As windows |
24 // are moved outside the work area they are shrunk. We remember the height of | 29 // are moved outside the work area they are shrunk. We remember the height of |
25 // the window before it was moved so that if the window is again moved up we | 30 // the window before it was moved so that if the window is again moved up we |
26 // attempt to restore the old height. | 31 // attempt to restore the old height. |
27 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { | 32 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { |
28 public: | 33 public: |
29 // When dragging an attached window this is the min size we'll make sure is | 34 // When dragging an attached window this is the min size we'll make sure is |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 128 |
124 aura::Window* window() const { return details_.window; } | 129 aura::Window* window() const { return details_.window; } |
125 | 130 |
126 const Details details_; | 131 const Details details_; |
127 | 132 |
128 const std::vector<aura::Window*> attached_windows_; | 133 const std::vector<aura::Window*> attached_windows_; |
129 | 134 |
130 // Set to true once Drag() is invoked and the bounds of the window change. | 135 // Set to true once Drag() is invoked and the bounds of the window change. |
131 bool did_move_or_resize_; | 136 bool did_move_or_resize_; |
132 | 137 |
133 internal::RootWindowEventFilter* root_filter_; | 138 aura::shared::RootWindowEventFilter* root_filter_; |
134 | 139 |
135 // The initial size of each of the windows in |attached_windows_| along the | 140 // The initial size of each of the windows in |attached_windows_| along the |
136 // primary axis. | 141 // primary axis. |
137 std::vector<int> initial_size_; | 142 std::vector<int> initial_size_; |
138 | 143 |
139 // The min size of each of the windows in |attached_windows_| along the | 144 // The min size of each of the windows in |attached_windows_| along the |
140 // primary axis. | 145 // primary axis. |
141 std::vector<int> min_size_; | 146 std::vector<int> min_size_; |
142 | 147 |
143 // The amount each of the windows in |attached_windows_| can be compressed. | 148 // The amount each of the windows in |attached_windows_| can be compressed. |
(...skipping 27 matching lines...) Expand all Loading... |
171 // the screen. | 176 // the screen. |
172 int num_mouse_moves_since_bounds_change_; | 177 int num_mouse_moves_since_bounds_change_; |
173 | 178 |
174 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); | 179 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); |
175 }; | 180 }; |
176 | 181 |
177 } // namespace internal | 182 } // namespace internal |
178 } // namespace ash | 183 } // namespace ash |
179 | 184 |
180 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ | 185 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
OLD | NEW |