Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: ash/drag_drop/drag_drop_controller.cc

Issue 11368072: aura: Add flag to indicate if a drag session is started with touch or mouse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/drag_drop/drag_drop_controller.h ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 Shell::GetInstance()->AddEnvEventFilter(this); 49 Shell::GetInstance()->AddEnvEventFilter(this);
50 } 50 }
51 51
52 DragDropController::~DragDropController() { 52 DragDropController::~DragDropController() {
53 Shell::GetInstance()->RemoveEnvEventFilter(this); 53 Shell::GetInstance()->RemoveEnvEventFilter(this);
54 Cleanup(); 54 Cleanup();
55 if (drag_image_.get()) 55 if (drag_image_.get())
56 drag_image_.reset(); 56 drag_image_.reset();
57 } 57 }
58 58
59 int DragDropController::StartDragAndDrop(const ui::OSExchangeData& data, 59 int DragDropController::StartDragAndDrop(
60 aura::RootWindow* root_window, 60 const ui::OSExchangeData& data,
61 const gfx::Point& root_location, 61 aura::RootWindow* root_window,
62 int operation) { 62 aura::Window* source_window,
63 const gfx::Point& root_location,
64 int operation,
65 ui::DragDropTypes::DragEventSource source) {
63 DCHECK(!IsDragDropInProgress()); 66 DCHECK(!IsDragDropInProgress());
64 67
65 drag_drop_tracker_.reset(new DragDropTracker); 68 drag_drop_tracker_.reset(new DragDropTracker);
66 69
67 drag_data_ = &data; 70 drag_data_ = &data;
68 drag_operation_ = operation; 71 drag_operation_ = operation;
69 const ui::OSExchangeDataProviderAura& provider = 72 const ui::OSExchangeDataProviderAura& provider =
70 static_cast<const ui::OSExchangeDataProviderAura&>(data.provider()); 73 static_cast<const ui::OSExchangeDataProviderAura&>(data.provider());
71 74
72 drag_image_.reset(new DragImageView); 75 drag_image_.reset(new DragImageView);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 drag_window_->RemoveObserver(this); 301 drag_window_->RemoveObserver(this);
299 drag_window_ = NULL; 302 drag_window_ = NULL;
300 drag_data_ = NULL; 303 drag_data_ = NULL;
301 // Cleanup can be called again while deleting DragDropTracker, so use Pass 304 // Cleanup can be called again while deleting DragDropTracker, so use Pass
302 // instead of reset to avoid double free. 305 // instead of reset to avoid double free.
303 drag_drop_tracker_.Pass(); 306 drag_drop_tracker_.Pass();
304 } 307 }
305 308
306 } // namespace internal 309 } // namespace internal
307 } // namespace ash 310 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_controller.h ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698