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

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

Issue 10386020: Revert r135533. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 months 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 | « no previous file | content/test/DEPS » ('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_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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 delegate->OnDragEntered(e); 107 delegate->OnDragEntered(e);
108 } 108 }
109 } else { 109 } else {
110 if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) { 110 if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
111 aura::DropTargetEvent e(*drag_data_, 111 aura::DropTargetEvent e(*drag_data_,
112 event.location(), 112 event.location(),
113 event.root_location(), 113 event.root_location(),
114 drag_operation_); 114 drag_operation_);
115 int op = delegate->OnDragUpdated(e); 115 int op = delegate->OnDragUpdated(e);
116 gfx::NativeCursor cursor = (op == ui::DragDropTypes::DRAG_NONE)? 116 gfx::NativeCursor cursor = (op == ui::DragDropTypes::DRAG_NONE)?
117 ui::kCursorNoDrop : ui::kCursorCopy; 117 ui::kCursorMove : ui::kCursorHand;
118 Shell::GetRootWindow()->SetCursor(cursor); 118 Shell::GetRootWindow()->SetCursor(cursor);
119 } 119 }
120 } 120 }
121 121
122 DCHECK(drag_image_.get()); 122 DCHECK(drag_image_.get());
123 if (drag_image_->visible()) { 123 if (drag_image_->visible()) {
124 drag_image_->SetScreenPosition( 124 drag_image_->SetScreenPosition(
125 event.root_location().Subtract(drag_image_offset_)); 125 event.root_location().Subtract(drag_image_offset_));
126 } 126 }
127 } 127 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 void DragDropController::Cleanup() { 264 void DragDropController::Cleanup() {
265 if (drag_window_) 265 if (drag_window_)
266 drag_window_->RemoveObserver(this); 266 drag_window_->RemoveObserver(this);
267 drag_window_ = NULL; 267 drag_window_ = NULL;
268 drag_data_ = NULL; 268 drag_data_ = NULL;
269 drag_drop_in_progress_ = false; 269 drag_drop_in_progress_ = false;
270 } 270 }
271 271
272 } // namespace internal 272 } // namespace internal
273 } // namespace ash 273 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | content/test/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698