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_PANELS_PANEL_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
6 #define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 6 #define ASH_WM_PANELS_PANEL_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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 virtual ~PanelWindowResizer(); | 24 virtual ~PanelWindowResizer(); |
25 | 25 |
26 // Creates a new PanelWindowResizer. The caller takes ownership of the | 26 // Creates a new PanelWindowResizer. The caller takes ownership of the |
27 // returned object. The ownership of |next_window_resizer| is taken by the | 27 // returned object. The ownership of |next_window_resizer| is taken by the |
28 // returned object. Returns NULL if not resizable. | 28 // returned object. Returns NULL if not resizable. |
29 static PanelWindowResizer* Create(WindowResizer* next_window_resizer, | 29 static PanelWindowResizer* Create(WindowResizer* next_window_resizer, |
30 wm::WindowState* window_state); | 30 wm::WindowState* window_state); |
31 | 31 |
32 // WindowResizer: | 32 // WindowResizer: |
33 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE; | 33 virtual void Drag(const gfx::Point& location, int event_flags) override; |
34 virtual void CompleteDrag() OVERRIDE; | 34 virtual void CompleteDrag() override; |
35 virtual void RevertDrag() OVERRIDE; | 35 virtual void RevertDrag() override; |
36 | 36 |
37 private: | 37 private: |
38 // Creates PanelWindowResizer that adds the ability to attach / detach panel | 38 // Creates PanelWindowResizer that adds the ability to attach / detach panel |
39 // windows as well as reparenting them to the panel layer while dragging to | 39 // windows as well as reparenting them to the panel layer while dragging to |
40 // |next_window_resizer|. This object takes ownership of | 40 // |next_window_resizer|. This object takes ownership of |
41 // |next_window_resizer|. | 41 // |next_window_resizer|. |
42 PanelWindowResizer(WindowResizer* next_window_resizer, | 42 PanelWindowResizer(WindowResizer* next_window_resizer, |
43 wm::WindowState* window_state); | 43 wm::WindowState* window_state); |
44 | 44 |
45 // Checks if the provided window bounds should attach to the launcher. If true | 45 // Checks if the provided window bounds should attach to the launcher. If true |
(...skipping 29 matching lines...) Expand all Loading... |
75 const bool was_attached_; | 75 const bool was_attached_; |
76 | 76 |
77 base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_; | 77 base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); | 79 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace ash | 82 } // namespace ash |
83 | 83 |
84 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 84 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
OLD | NEW |