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/toplevel_window_event_filter.h" | 5 #include "ash/wm/toplevel_window_event_filter.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/default_window_resizer.h" | 8 #include "ash/wm/default_window_resizer.h" |
9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
10 #include "ash/wm/resize_shadow_controller.h" | 10 #include "ash/wm/resize_shadow_controller.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 195 } |
196 break; | 196 break; |
197 } | 197 } |
198 default: | 198 default: |
199 return ui::GESTURE_STATUS_UNKNOWN; | 199 return ui::GESTURE_STATUS_UNKNOWN; |
200 } | 200 } |
201 | 201 |
202 return ui::GESTURE_STATUS_CONSUMED; | 202 return ui::GESTURE_STATUS_CONSUMED; |
203 } | 203 } |
204 | 204 |
205 void ToplevelWindowEventFilter::RunMoveLoop(aura::Window* source) { | 205 void ToplevelWindowEventFilter::RunMoveLoop(aura::Window* source, |
| 206 const gfx::Point& drag_offset) { |
206 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. | 207 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. |
207 in_move_loop_ = true; | 208 in_move_loop_ = true; |
208 aura::RootWindow* root_window = source->GetRootWindow(); | 209 aura::RootWindow* root_window = source->GetRootWindow(); |
209 DCHECK(root_window); | 210 DCHECK(root_window); |
210 gfx::Point drag_location; | 211 gfx::Point drag_location; |
211 if (aura::Env::GetInstance()->is_touch_down()) { | 212 if (aura::Env::GetInstance()->is_touch_down()) { |
212 in_gesture_resize_ = true; | 213 in_gesture_resize_ = true; |
213 bool has_point = root_window->gesture_recognizer()-> | 214 bool has_point = root_window->gesture_recognizer()-> |
214 GetLastTouchPointForTarget(source, &drag_location); | 215 GetLastTouchPointForTarget(source, &drag_location); |
215 DCHECK(has_point); | 216 DCHECK(has_point); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 bool ToplevelWindowEventFilter::HandleMouseExited(aura::Window* target, | 302 bool ToplevelWindowEventFilter::HandleMouseExited(aura::Window* target, |
302 ui::LocatedEvent* event) { | 303 ui::LocatedEvent* event) { |
303 internal::ResizeShadowController* controller = | 304 internal::ResizeShadowController* controller = |
304 Shell::GetInstance()->resize_shadow_controller(); | 305 Shell::GetInstance()->resize_shadow_controller(); |
305 if (controller) | 306 if (controller) |
306 controller->HideShadow(target); | 307 controller->HideShadow(target); |
307 return false; | 308 return false; |
308 } | 309 } |
309 | 310 |
310 } // namespace ash | 311 } // namespace ash |
OLD | NEW |