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 11 matching lines...) Expand all Loading... |
22 static DefaultWindowResizer* Create(wm::WindowState* window_state); | 22 static DefaultWindowResizer* Create(wm::WindowState* window_state); |
23 | 23 |
24 // Returns true if the drag will result in changing the window in anyway. | 24 // Returns true if the drag will result in changing the window in anyway. |
25 bool is_resizable() const { return details().is_resizable; } | 25 bool is_resizable() const { return details().is_resizable; } |
26 | 26 |
27 bool changed_size() const { | 27 bool changed_size() const { |
28 return !(details().bounds_change & kBoundsChange_Repositions); | 28 return !(details().bounds_change & kBoundsChange_Repositions); |
29 } | 29 } |
30 | 30 |
31 // WindowResizer: | 31 // WindowResizer: |
32 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; | 32 virtual void Drag(const gfx::Point& location, int event_flags) override; |
33 virtual void CompleteDrag() OVERRIDE; | 33 virtual void CompleteDrag() override; |
34 virtual void RevertDrag() OVERRIDE; | 34 virtual void RevertDrag() override; |
35 | 35 |
36 private: | 36 private: |
37 explicit DefaultWindowResizer(wm::WindowState* window_state); | 37 explicit DefaultWindowResizer(wm::WindowState* window_state); |
38 | 38 |
39 // Set to true once Drag() is invoked and the bounds of the window change. | 39 // Set to true once Drag() is invoked and the bounds of the window change. |
40 bool did_move_or_resize_; | 40 bool did_move_or_resize_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); | 42 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace aura | 45 } // namespace aura |
46 | 46 |
47 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ | 47 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
OLD | NEW |