| 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_PANELS_PANEL_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
| 6 #define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 6 #define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/wm/window_resizer.h" | 10 #include "ash/wm/window_resizer.h" |
| 9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 12 | 14 |
| 13 namespace gfx { | 15 namespace gfx { |
| 14 class Rect; | 16 class Rect; |
| 15 class Point; | 17 class Point; |
| 16 } | 18 } |
| 17 | 19 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void FinishDragging(); | 58 void FinishDragging(); |
| 57 | 59 |
| 58 // Updates the dragged panel's index in the launcher. | 60 // Updates the dragged panel's index in the launcher. |
| 59 void UpdateLauncherPosition(); | 61 void UpdateLauncherPosition(); |
| 60 | 62 |
| 61 // Last pointer location in screen coordinates. | 63 // Last pointer location in screen coordinates. |
| 62 gfx::Point last_location_; | 64 gfx::Point last_location_; |
| 63 | 65 |
| 64 // Wraps a window resizer and adds panel detaching / reattaching and snapping | 66 // Wraps a window resizer and adds panel detaching / reattaching and snapping |
| 65 // to launcher behavior during drags. | 67 // to launcher behavior during drags. |
| 66 scoped_ptr<WindowResizer> next_window_resizer_; | 68 std::unique_ptr<WindowResizer> next_window_resizer_; |
| 67 | 69 |
| 68 // Panel container window. | 70 // Panel container window. |
| 69 aura::Window* panel_container_; | 71 aura::Window* panel_container_; |
| 70 aura::Window* initial_panel_container_; | 72 aura::Window* initial_panel_container_; |
| 71 | 73 |
| 72 // Set to true once Drag() is invoked and the bounds of the window change. | 74 // Set to true once Drag() is invoked and the bounds of the window change. |
| 73 bool did_move_or_resize_; | 75 bool did_move_or_resize_; |
| 74 | 76 |
| 75 // True if the window started attached to the launcher. | 77 // True if the window started attached to the launcher. |
| 76 const bool was_attached_; | 78 const bool was_attached_; |
| 77 | 79 |
| 78 base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_; | 80 base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); | 82 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace ash | 85 } // namespace ash |
| 84 | 86 |
| 85 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 87 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
| OLD | NEW |