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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // returned object. Returns NULL if not resizable. | 36 // returned object. Returns NULL if not resizable. |
37 static DefaultWindowResizer* Create(aura::Window* window, | 37 static DefaultWindowResizer* Create(aura::Window* window, |
38 const gfx::Point& location, | 38 const gfx::Point& location, |
39 int window_component, | 39 int window_component, |
40 int grid_size); | 40 int grid_size); |
41 | 41 |
42 // Returns true if the drag will result in changing the window in anyway. | 42 // Returns true if the drag will result in changing the window in anyway. |
43 bool is_resizable() const { return details_.is_resizable; } | 43 bool is_resizable() const { return details_.is_resizable; } |
44 | 44 |
45 // WindowResizer overides: | 45 // WindowResizer overides: |
46 virtual void Drag(const gfx::Point& location) OVERRIDE; | 46 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; |
47 virtual void CompleteDrag() OVERRIDE; | 47 virtual void CompleteDrag() OVERRIDE; |
48 virtual void RevertDrag() OVERRIDE; | 48 virtual void RevertDrag() OVERRIDE; |
49 | 49 |
50 private: | 50 private: |
51 explicit DefaultWindowResizer(const Details& details); | 51 explicit DefaultWindowResizer(const Details& details); |
52 | 52 |
53 const Details details_; | 53 const Details details_; |
54 | 54 |
55 // Set to true once Drag() is invoked and the bounds of the window change. | 55 // Set to true once Drag() is invoked and the bounds of the window change. |
56 bool did_move_or_resize_; | 56 bool did_move_or_resize_; |
57 | 57 |
58 internal::RootWindowEventFilter* root_filter_; | 58 internal::RootWindowEventFilter* root_filter_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); | 60 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace aura | 63 } // namespace aura |
64 | 64 |
65 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ | 65 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ |
OLD | NEW |