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 #include "ash/wm/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 PanelWindowResizer::~PanelWindowResizer() { | 43 PanelWindowResizer::~PanelWindowResizer() { |
44 if (destroyed_) | 44 if (destroyed_) |
45 *destroyed_ = true; | 45 *destroyed_ = true; |
46 } | 46 } |
47 | 47 |
48 // static | 48 // static |
49 PanelWindowResizer* | 49 PanelWindowResizer* |
50 PanelWindowResizer::Create(WindowResizer* next_window_resizer, | 50 PanelWindowResizer::Create(WindowResizer* next_window_resizer, |
51 aura::Window* window, | 51 aura::Window* window, |
52 const gfx::Point& location, | 52 const gfx::Point& location, |
53 int window_component) { | 53 int window_component, |
54 Details details(window, location, window_component); | 54 aura::client::WindowMoveSource source) { |
| 55 Details details(window, location, window_component, source); |
55 return details.is_resizable ? | 56 return details.is_resizable ? |
56 new PanelWindowResizer(next_window_resizer, details) : NULL; | 57 new PanelWindowResizer(next_window_resizer, details) : NULL; |
57 } | 58 } |
58 | 59 |
59 void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) { | 60 void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) { |
60 bool destroyed = false; | 61 bool destroyed = false; |
61 if (!did_move_or_resize_) { | 62 if (!did_move_or_resize_) { |
62 did_move_or_resize_ = true; | 63 did_move_or_resize_ = true; |
63 StartedDragging(); | 64 StartedDragging(); |
64 } | 65 } |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 } | 214 } |
214 | 215 |
215 void PanelWindowResizer::UpdateLauncherPosition() { | 216 void PanelWindowResizer::UpdateLauncherPosition() { |
216 if (panel_container_) { | 217 if (panel_container_) { |
217 GetPanelLayoutManager(panel_container_)->launcher()-> | 218 GetPanelLayoutManager(panel_container_)->launcher()-> |
218 UpdateIconPositionForWindow(GetTarget()); | 219 UpdateIconPositionForWindow(GetTarget()); |
219 } | 220 } |
220 } | 221 } |
221 | 222 |
222 } // namespace aura | 223 } // namespace aura |
OLD | NEW |