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/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
6 | 6 |
7 #include "ash/drag_drop/drag_image_view.h" | 7 #include "ash/drag_drop/drag_image_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/cursor_manager.h" | 9 #include "ash/wm/cursor_manager.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // We could also reach here because RootWindow may sometimes generate a | 225 // We could also reach here because RootWindow may sometimes generate a |
226 // bunch of fake mouse events | 226 // bunch of fake mouse events |
227 // (aura::RootWindow::PostMouseMoveEventAfterWindowChange). | 227 // (aura::RootWindow::PostMouseMoveEventAfterWindowChange). |
228 break; | 228 break; |
229 } | 229 } |
230 return true; | 230 return true; |
231 } | 231 } |
232 | 232 |
233 ui::TouchStatus DragDropController::PreHandleTouchEvent( | 233 ui::TouchStatus DragDropController::PreHandleTouchEvent( |
234 aura::Window* target, | 234 aura::Window* target, |
235 ui::TouchEventImpl* event) { | 235 ui::TouchEvent* event) { |
236 // TODO(sad): Also check for the touch-id. | 236 // TODO(sad): Also check for the touch-id. |
237 if (!drag_drop_in_progress_) | 237 if (!drag_drop_in_progress_) |
238 return ui::TOUCH_STATUS_UNKNOWN; | 238 return ui::TOUCH_STATUS_UNKNOWN; |
239 switch (event->type()) { | 239 switch (event->type()) { |
240 case ui::ET_TOUCH_MOVED: | 240 case ui::ET_TOUCH_MOVED: |
241 DragUpdate(target, *event); | 241 DragUpdate(target, *event); |
242 break; | 242 break; |
243 case ui::ET_TOUCH_RELEASED: | 243 case ui::ET_TOUCH_RELEASED: |
244 Drop(target, *event); | 244 Drop(target, *event); |
245 break; | 245 break; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void DragDropController::Cleanup() { | 295 void DragDropController::Cleanup() { |
296 if (drag_window_) | 296 if (drag_window_) |
297 drag_window_->RemoveObserver(this); | 297 drag_window_->RemoveObserver(this); |
298 drag_window_ = NULL; | 298 drag_window_ = NULL; |
299 drag_data_ = NULL; | 299 drag_data_ = NULL; |
300 drag_drop_in_progress_ = false; | 300 drag_drop_in_progress_ = false; |
301 } | 301 } |
302 | 302 |
303 } // namespace internal | 303 } // namespace internal |
304 } // namespace ash | 304 } // namespace ash |
OLD | NEW |