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

Side by Side Diff: services/ui/ws/drag_controller.cc

Issue 2764963003: aura-mus: add a drag representation image. (Closed)
Patch Set: Patch cleanup. Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/drag_controller.h" 5 #include "services/ui/ws/drag_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "services/ui/public/interfaces/cursor.mojom.h" 10 #include "services/ui/public/interfaces/cursor.mojom.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 while (current_target && !current_target->can_accept_drops()) 100 while (current_target && !current_target->can_accept_drops())
101 current_target = current_target->parent(); 101 current_target = current_target->parent();
102 102
103 if (current_target) { 103 if (current_target) {
104 // If we're non-null, we're about to use |current_target| in some 104 // If we're non-null, we're about to use |current_target| in some
105 // way. Ensure that we receive notifications that this window has gone 105 // way. Ensure that we receive notifications that this window has gone
106 // away. 106 // away.
107 EnsureWindowObserved(current_target); 107 EnsureWindowObserved(current_target);
108 } 108 }
109 109
110 source_->OnDragContinued(screen_position);
111
110 if (current_target && current_target == current_target_window_ && 112 if (current_target && current_target == current_target_window_ &&
111 event.type() != ET_POINTER_UP) { 113 event.type() != ET_POINTER_UP) {
112 QueueOperation(current_target, OperationType::OVER, event_flags, 114 QueueOperation(current_target, OperationType::OVER, event_flags,
113 screen_position); 115 screen_position);
114 } else if (current_target != current_target_window_) { 116 } else if (current_target != current_target_window_) {
115 if (current_target_window_) { 117 if (current_target_window_) {
116 QueueOperation(current_target_window_, OperationType::LEAVE, event_flags, 118 QueueOperation(current_target_window_, OperationType::LEAVE, event_flags,
117 screen_position); 119 screen_position);
118 } 120 }
119 121
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 return "LEAVE"; 358 return "LEAVE";
357 case OperationType::DROP: 359 case OperationType::DROP:
358 return "DROP"; 360 return "DROP";
359 } 361 }
360 NOTREACHED(); 362 NOTREACHED();
361 return std::string(); 363 return std::string();
362 } 364 }
363 365
364 } // namespace ws 366 } // namespace ws
365 } // namespace ui 367 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698