| 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 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const gfx::Point& location, | 23 const gfx::Point& location, |
| 24 int window_component, | 24 int window_component, |
| 25 aura::client::WindowMoveSource source); | 25 aura::client::WindowMoveSource source); |
| 26 | 26 |
| 27 // Returns true if the drag will result in changing the window in anyway. | 27 // Returns true if the drag will result in changing the window in anyway. |
| 28 bool is_resizable() const { return details_.is_resizable; } | 28 bool is_resizable() const { return details_.is_resizable; } |
| 29 | 29 |
| 30 bool changed_size() const { | 30 bool changed_size() const { |
| 31 return !(details_.bounds_change & kBoundsChange_Repositions); | 31 return !(details_.bounds_change & kBoundsChange_Repositions); |
| 32 } | 32 } |
| 33 aura::Window* target_window() const { return details_.window; } | |
| 34 | 33 |
| 35 // WindowResizer: | 34 // WindowResizer: |
| 36 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; | 35 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; |
| 37 virtual void CompleteDrag() OVERRIDE; | 36 virtual void CompleteDrag() OVERRIDE; |
| 38 virtual void RevertDrag() OVERRIDE; | 37 virtual void RevertDrag() OVERRIDE; |
| 39 virtual aura::Window* GetTarget() OVERRIDE; | 38 virtual aura::Window* GetTarget() OVERRIDE; |
| 40 virtual const gfx::Point& GetInitialLocation() const OVERRIDE; | 39 virtual const gfx::Point& GetInitialLocation() const OVERRIDE; |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 explicit DefaultWindowResizer(const Details& details); | 42 explicit DefaultWindowResizer(const Details& details); |
| 44 | 43 |
| 45 const Details details_; | 44 const Details details_; |
| 46 | 45 |
| 47 // Set to true once Drag() is invoked and the bounds of the window change. | 46 // Set to true once Drag() is invoked and the bounds of the window change. |
| 48 bool did_move_or_resize_; | 47 bool did_move_or_resize_; |
| 49 | 48 |
| 50 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); | 49 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); |
| 51 }; | 50 }; |
| 52 | 51 |
| 53 } // namespace aura | 52 } // namespace aura |
| 54 | 53 |
| 55 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ | 54 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
| OLD | NEW |