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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 virtual ~MultiWindowResizeController(); | 43 virtual ~MultiWindowResizeController(); |
44 | 44 |
45 // If necessary, shows the resize widget. |window| is the window the mouse | 45 // If necessary, shows the resize widget. |window| is the window the mouse |
46 // is over, |component| the edge and |point| the location of the mouse. | 46 // is over, |component| the edge and |point| the location of the mouse. |
47 void Show(aura::Window* window, int component, const gfx::Point& point); | 47 void Show(aura::Window* window, int component, const gfx::Point& point); |
48 | 48 |
49 // Hides the resize widget. | 49 // Hides the resize widget. |
50 void Hide(); | 50 void Hide(); |
51 | 51 |
52 // MouseWatcherListenre overrides: | 52 // MouseWatcherListenre overrides: |
53 virtual void MouseMovedOutOfHost() OVERRIDE; | 53 virtual void MouseMovedOutOfHost() override; |
54 | 54 |
55 // WindowObserver overrides: | 55 // WindowObserver overrides: |
56 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 56 virtual void OnWindowDestroying(aura::Window* window) override; |
57 | 57 |
58 private: | 58 private: |
59 friend class MultiWindowResizeControllerTest; | 59 friend class MultiWindowResizeControllerTest; |
60 | 60 |
61 // Used to track the two resizable windows and direction. | 61 // Used to track the two resizable windows and direction. |
62 struct ResizeWindows { | 62 struct ResizeWindows { |
63 ResizeWindows(); | 63 ResizeWindows(); |
64 ~ResizeWindows(); | 64 ~ResizeWindows(); |
65 | 65 |
66 // Returns true if |other| equals this ResizeWindows. This does *not* | 66 // Returns true if |other| equals this ResizeWindows. This does *not* |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 scoped_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 |