| 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_DEFAULT_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
| 6 #define ASH_WM_DEFAULT_WINDOW_RESIZER_H_ | 6 #define ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 class WmShell; | |
| 14 | 13 |
| 15 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving | 14 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving |
| 16 // or resizing a window. All coordinates passed to this are in the parent | 15 // or resizing a window. All coordinates passed to this are in the parent |
| 17 // windows coordiantes. | 16 // windows coordiantes. |
| 18 class ASH_EXPORT DefaultWindowResizer : public WindowResizer { | 17 class ASH_EXPORT DefaultWindowResizer : public WindowResizer { |
| 19 public: | 18 public: |
| 20 ~DefaultWindowResizer() override; | 19 ~DefaultWindowResizer() override; |
| 21 | 20 |
| 22 // Creates a new DefaultWindowResizer. The caller takes ownership of the | 21 // Creates a new DefaultWindowResizer. The caller takes ownership of the |
| 23 // returned object. | 22 // returned object. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 34 void Drag(const gfx::Point& location, int event_flags) override; | 33 void Drag(const gfx::Point& location, int event_flags) override; |
| 35 void CompleteDrag() override; | 34 void CompleteDrag() override; |
| 36 void RevertDrag() override; | 35 void RevertDrag() override; |
| 37 | 36 |
| 38 private: | 37 private: |
| 39 explicit DefaultWindowResizer(wm::WindowState* window_state); | 38 explicit DefaultWindowResizer(wm::WindowState* window_state); |
| 40 | 39 |
| 41 // Set to true once Drag() is invoked and the bounds of the window change. | 40 // Set to true once Drag() is invoked and the bounds of the window change. |
| 42 bool did_move_or_resize_; | 41 bool did_move_or_resize_; |
| 43 | 42 |
| 44 WmShell* shell_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); | 43 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 } // namespace aura | 46 } // namespace aura |
| 50 | 47 |
| 51 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ | 48 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
| OLD | NEW |