| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // Completes the resize. | 133 // Completes the resize. |
| 134 void CompleteResize(); | 134 void CompleteResize(); |
| 135 | 135 |
| 136 // Cancels the resize. | 136 // Cancels the resize. |
| 137 void CancelResize(); | 137 void CancelResize(); |
| 138 | 138 |
| 139 // Returns the bounds for the resize widget. | 139 // Returns the bounds for the resize widget. |
| 140 gfx::Rect CalculateResizeWidgetBounds( | 140 gfx::Rect CalculateResizeWidgetBounds( |
| 141 const gfx::Point& location_in_parent) const; | 141 const gfx::Point& location_in_parent) const; |
| 142 | 142 |
| 143 // Returns true if |location_in_screen| is over the resize widget. |
| 144 bool IsOverResizeWidget(const gfx::Point& location_in_screen) const; |
| 145 |
| 143 // Returns true if |location_in_screen| is over the resize windows | 146 // Returns true if |location_in_screen| is over the resize windows |
| 144 // (or the resize widget itself). | 147 // (or the resize widget itself). |
| 145 bool IsOverWindows(const gfx::Point& location_in_screen) const; | 148 bool IsOverWindows(const gfx::Point& location_in_screen) const; |
| 146 | 149 |
| 147 // Returns true if |location_in_screen| is over |component| in |window|. | 150 // Returns true if |location_in_screen| is over |component| in |window|. |
| 148 bool IsOverComponent(aura::Window* window, | 151 bool IsOverComponent(aura::Window* window, |
| 149 const gfx::Point& location_in_screen, | 152 const gfx::Point& location_in_screen, |
| 150 int component) const; | 153 int component) const; |
| 151 | 154 |
| 152 // Windows and direction to resize. | 155 // Windows and direction to resize. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 170 // |resize_widget_| is non-NULL (ie the widget is showing) we ignore calls | 173 // |resize_widget_| is non-NULL (ie the widget is showing) we ignore calls |
| 171 // to Show(). | 174 // to Show(). |
| 172 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 175 scoped_ptr<views::MouseWatcher> mouse_watcher_; |
| 173 | 176 |
| 174 DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController); | 177 DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController); |
| 175 }; | 178 }; |
| 176 | 179 |
| 177 } // namespace ash | 180 } // namespace ash |
| 178 | 181 |
| 179 #endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ | 182 #endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ |
| OLD | NEW |