| 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_drop_tracker.h" | 7 #include "ash/drag_drop/drag_drop_tracker.h" |
| 8 #include "ash/drag_drop/drag_image_view.h" | 8 #include "ash/drag_drop/drag_image_view.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/coordinate_conversion.h" | 10 #include "ash/wm/coordinate_conversion.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 //////////////////////////////////////////////////////////////////////////////// | 138 //////////////////////////////////////////////////////////////////////////////// |
| 139 // DragDropController, public: | 139 // DragDropController, public: |
| 140 | 140 |
| 141 DragDropController::DragDropController() | 141 DragDropController::DragDropController() |
| 142 : drag_image_(NULL), | 142 : drag_image_(NULL), |
| 143 drag_data_(NULL), | 143 drag_data_(NULL), |
| 144 drag_operation_(0), | 144 drag_operation_(0), |
| 145 drag_window_(NULL), | 145 drag_window_(NULL), |
| 146 drag_source_window_(NULL), | 146 drag_source_window_(NULL), |
| 147 should_block_during_drag_drop_(true), | 147 should_block_during_drag_drop_(true), |
| 148 ALLOW_THIS_IN_INITIALIZER_LIST( | 148 drag_drop_window_delegate_(new DragDropTrackerDelegate(this)), |
| 149 drag_drop_window_delegate_(new DragDropTrackerDelegate(this))), | |
| 150 current_drag_event_source_(ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE), | 149 current_drag_event_source_(ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE), |
| 151 weak_factory_(this) { | 150 weak_factory_(this) { |
| 152 Shell::GetInstance()->AddPreTargetHandler(this); | 151 Shell::GetInstance()->AddPreTargetHandler(this); |
| 153 } | 152 } |
| 154 | 153 |
| 155 DragDropController::~DragDropController() { | 154 DragDropController::~DragDropController() { |
| 156 Shell::GetInstance()->RemovePreTargetHandler(this); | 155 Shell::GetInstance()->RemovePreTargetHandler(this); |
| 157 Cleanup(); | 156 Cleanup(); |
| 158 if (cancel_animation_) | 157 if (cancel_animation_) |
| 159 cancel_animation_->End(); | 158 cancel_animation_->End(); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 drag_window_->RemoveObserver(this); | 554 drag_window_->RemoveObserver(this); |
| 556 drag_window_ = NULL; | 555 drag_window_ = NULL; |
| 557 drag_data_ = NULL; | 556 drag_data_ = NULL; |
| 558 // Cleanup can be called again while deleting DragDropTracker, so use Pass | 557 // Cleanup can be called again while deleting DragDropTracker, so use Pass |
| 559 // instead of reset to avoid double free. | 558 // instead of reset to avoid double free. |
| 560 drag_drop_tracker_.Pass(); | 559 drag_drop_tracker_.Pass(); |
| 561 } | 560 } |
| 562 | 561 |
| 563 } // namespace internal | 562 } // namespace internal |
| 564 } // namespace ash | 563 } // namespace ash |
| OLD | NEW |