| 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 | 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 | |
| 24 namespace internal { | |
| 25 | |
| 26 class DockedWindowLayoutManager; | 20 class DockedWindowLayoutManager; |
| 27 class PhantomWindowController; | 21 class PhantomWindowController; |
| 28 class TwoStepEdgeCycler; | 22 class TwoStepEdgeCycler; |
| 29 class WindowSize; | 23 class WindowSize; |
| 30 | 24 |
| 25 namespace wm { |
| 26 class WindowState; |
| 27 } |
| 28 |
| 31 // WindowResizer implementation for workspaces. This enforces that windows are | 29 // WindowResizer implementation for workspaces. This enforces that windows are |
| 32 // not allowed to vertically move or resize outside of the work area. As windows | 30 // 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 | 31 // 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 | 32 // the window before it was moved so that if the window is again moved up we |
| 35 // attempt to restore the old height. | 33 // attempt to restore the old height. |
| 36 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { | 34 class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { |
| 37 public: | 35 public: |
| 38 // When dragging an attached window this is the min size we'll make sure is | 36 // 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 | 37 // visible. In the vertical direction we take the max of this and that from |
| 40 // the delegate. | 38 // the delegate. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // Used to determine if this has been deleted during a drag such as when a tab | 213 // Used to determine if this has been deleted during a drag such as when a tab |
| 216 // gets dragged into another browser window. | 214 // gets dragged into another browser window. |
| 217 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; | 215 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; |
| 218 | 216 |
| 219 // Current instance for use by the WorkspaceWindowResizerTest. | 217 // Current instance for use by the WorkspaceWindowResizerTest. |
| 220 static WorkspaceWindowResizer* instance_; | 218 static WorkspaceWindowResizer* instance_; |
| 221 | 219 |
| 222 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); | 220 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); |
| 223 }; | 221 }; |
| 224 | 222 |
| 225 } // namespace internal | |
| 226 } // namespace ash | 223 } // namespace ash |
| 227 | 224 |
| 228 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ | 225 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
| OLD | NEW |