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