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 "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "ui/aura/client/drag_drop_delegate.h" | 10 #include "ui/aura/client/drag_drop_delegate.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace { | 27 namespace { |
28 const gfx::Point kDragDropWidgetOffset(0, 0); | 28 const gfx::Point kDragDropWidgetOffset(0, 0); |
29 const base::TimeDelta kDragDropAnimationDuration = | 29 const base::TimeDelta kDragDropAnimationDuration = |
30 base::TimeDelta::FromMilliseconds(250); | 30 base::TimeDelta::FromMilliseconds(250); |
31 } | 31 } |
32 | 32 |
33 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
34 // DragDropController, public: | 34 // DragDropController, public: |
35 | 35 |
36 DragDropController::DragDropController() | 36 DragDropController::DragDropController() |
37 : aura::EventFilter(RootWindow::GetInstance()), | 37 : drag_image_(NULL), |
38 drag_image_(NULL), | |
39 drag_data_(NULL), | 38 drag_data_(NULL), |
40 drag_operation_(0), | 39 drag_operation_(0), |
41 dragged_window_(NULL), | 40 dragged_window_(NULL), |
42 drag_drop_in_progress_(false), | 41 drag_drop_in_progress_(false), |
43 should_block_during_drag_drop_(true) { | 42 should_block_during_drag_drop_(true) { |
44 Shell::GetInstance()->AddRootWindowEventFilter(this); | 43 Shell::GetInstance()->AddRootWindowEventFilter(this); |
45 aura::client::SetDragDropClient(this); | 44 aura::client::SetDragDropClient(this); |
46 } | 45 } |
47 | 46 |
48 DragDropController::~DragDropController() { | 47 DragDropController::~DragDropController() { |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 window->SetBounds(gfx::Rect(drag_start_location_, window->bounds().size())); | 229 window->SetBounds(gfx::Rect(drag_start_location_, window->bounds().size())); |
231 } | 230 } |
232 | 231 |
233 void DragDropController::Cleanup() { | 232 void DragDropController::Cleanup() { |
234 drag_data_ = NULL; | 233 drag_data_ = NULL; |
235 drag_drop_in_progress_ = false; | 234 drag_drop_in_progress_ = false; |
236 } | 235 } |
237 | 236 |
238 } // namespace internal | 237 } // namespace internal |
239 } // namespace ash | 238 } // namespace ash |
OLD | NEW |