| 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_MULTI_WINDOW_RESIZE_CONTROLLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ |
| 6 #define ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ | 6 #define ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 14 #include "ui/aura/window_observer.h" | 14 #include "ui/aura/window_observer.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/views/mouse_watcher.h" | 16 #include "ui/views/mouse_watcher.h" |
| 17 | 17 |
| 18 namespace aura { | 18 namespace aura { |
| 19 class Window; | 19 class Window; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace views { | 22 namespace views { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool IsOverComponent(aura::Window* window, | 152 bool IsOverComponent(aura::Window* window, |
| 153 const gfx::Point& location_in_screen, | 153 const gfx::Point& location_in_screen, |
| 154 int component) const; | 154 int component) const; |
| 155 | 155 |
| 156 // Windows and direction to resize. | 156 // Windows and direction to resize. |
| 157 ResizeWindows windows_; | 157 ResizeWindows windows_; |
| 158 | 158 |
| 159 // Timer used before showing. | 159 // Timer used before showing. |
| 160 base::OneShotTimer show_timer_; | 160 base::OneShotTimer show_timer_; |
| 161 | 161 |
| 162 scoped_ptr<views::Widget> resize_widget_; | 162 std::unique_ptr<views::Widget> resize_widget_; |
| 163 | 163 |
| 164 // If non-null we're in a resize loop. | 164 // If non-null we're in a resize loop. |
| 165 scoped_ptr<WorkspaceWindowResizer> window_resizer_; | 165 std::unique_ptr<WorkspaceWindowResizer> window_resizer_; |
| 166 | 166 |
| 167 // Mouse coordinate passed to Show() in container's coodinates. | 167 // Mouse coordinate passed to Show() in container's coodinates. |
| 168 gfx::Point show_location_in_parent_; | 168 gfx::Point show_location_in_parent_; |
| 169 | 169 |
| 170 // Bounds the widget was last shown at in screen coordinates. | 170 // Bounds the widget was last shown at in screen coordinates. |
| 171 gfx::Rect show_bounds_in_screen_; | 171 gfx::Rect show_bounds_in_screen_; |
| 172 | 172 |
| 173 // Used to detect whether the mouse is over the windows. While | 173 // Used to detect whether the mouse is over the windows. While |
| 174 // |resize_widget_| is non-NULL (ie the widget is showing) we ignore calls | 174 // |resize_widget_| is non-NULL (ie the widget is showing) we ignore calls |
| 175 // to Show(). | 175 // to Show(). |
| 176 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 176 std::unique_ptr<views::MouseWatcher> mouse_watcher_; |
| 177 | 177 |
| 178 DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController); | 178 DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace ash | 181 } // namespace ash |
| 182 | 182 |
| 183 #endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ | 183 #endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ |
| OLD | NEW |