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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 private: | 132 private: |
133 DragDropController* drag_drop_controller_; | 133 DragDropController* drag_drop_controller_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(DragDropTrackerDelegate); | 135 DISALLOW_COPY_AND_ASSIGN(DragDropTrackerDelegate); |
136 }; | 136 }; |
137 | 137 |
138 //////////////////////////////////////////////////////////////////////////////// | 138 //////////////////////////////////////////////////////////////////////////////// |
139 // DragDropController, public: | 139 // DragDropController, public: |
140 | 140 |
141 DragDropController::DragDropController() | 141 DragDropController::DragDropController() |
142 : drag_image_(NULL), | 142 : drag_data_(NULL), |
143 drag_data_(NULL), | |
144 drag_operation_(0), | 143 drag_operation_(0), |
145 drag_window_(NULL), | 144 drag_window_(NULL), |
146 drag_source_window_(NULL), | 145 drag_source_window_(NULL), |
147 should_block_during_drag_drop_(true), | 146 should_block_during_drag_drop_(true), |
148 drag_drop_window_delegate_(new DragDropTrackerDelegate(this)), | 147 drag_drop_window_delegate_(new DragDropTrackerDelegate(this)), |
149 current_drag_event_source_(ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE), | 148 current_drag_event_source_(ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE), |
150 weak_factory_(this) { | 149 weak_factory_(this) { |
151 Shell::GetInstance()->PrependPreTargetHandler(this); | 150 Shell::GetInstance()->PrependPreTargetHandler(this); |
152 } | 151 } |
153 | 152 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 drag_window_->RemoveObserver(this); | 558 drag_window_->RemoveObserver(this); |
560 drag_window_ = NULL; | 559 drag_window_ = NULL; |
561 drag_data_ = NULL; | 560 drag_data_ = NULL; |
562 // Cleanup can be called again while deleting DragDropTracker, so use Pass | 561 // Cleanup can be called again while deleting DragDropTracker, so use Pass |
563 // instead of reset to avoid double free. | 562 // instead of reset to avoid double free. |
564 drag_drop_tracker_.Pass(); | 563 drag_drop_tracker_.Pass(); |
565 } | 564 } |
566 | 565 |
567 } // namespace internal | 566 } // namespace internal |
568 } // namespace ash | 567 } // namespace ash |
OLD | NEW |