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_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
6 #define ASH_WM_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 6 #define ASH_WM_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 15 matching lines...) Expand all Loading... |
26 namespace wm { | 26 namespace wm { |
27 class WindowState; | 27 class WindowState; |
28 class WmGlobals; | 28 class WmGlobals; |
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_WM_COMMON_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 |
39 // visible. In the vertical direction we take the max of this and that from | 39 // visible. In the vertical direction we take the max of this and that from |
40 // the delegate. | 40 // the delegate. |
41 static const int kMinOnscreenSize; | 41 static const int kMinOnscreenSize; |
42 | 42 |
43 // Min height we'll force on screen when dragging the caption. | 43 // Min height we'll force on screen when dragging the caption. |
44 // TODO: this should come from a property on the window. | 44 // TODO: this should come from a property on the window. |
45 static const int kMinOnscreenHeight; | 45 static const int kMinOnscreenHeight; |
46 | 46 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_WM_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 230 #endif // ASH_WM_COMMON_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
OLD | NEW |