OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/test_runner/event_sender.h" | 5 #include "components/test_runner/event_sender.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 } | 2604 } |
2605 | 2605 |
2606 void EventSender::FinishDragAndDrop(const WebMouseEvent& e, | 2606 void EventSender::FinishDragAndDrop(const WebMouseEvent& e, |
2607 blink::WebDragOperation drag_effect) { | 2607 blink::WebDragOperation drag_effect) { |
2608 WebPoint client_point(e.x, e.y); | 2608 WebPoint client_point(e.x, e.y); |
2609 WebPoint screen_point(e.globalX, e.globalY); | 2609 WebPoint screen_point(e.globalX, e.globalY); |
2610 current_drag_effect_ = drag_effect; | 2610 current_drag_effect_ = drag_effect; |
2611 if (current_drag_effect_) { | 2611 if (current_drag_effect_) { |
2612 // Specifically pass any keyboard modifiers to the drop method. This allows | 2612 // Specifically pass any keyboard modifiers to the drop method. This allows |
2613 // tests to control the drop type (i.e. copy or move). | 2613 // tests to control the drop type (i.e. copy or move). |
2614 view()->dragTargetDrop(client_point, screen_point, e.modifiers); | 2614 view()->dragTargetDrop(current_drag_data_, client_point, screen_point, |
| 2615 e.modifiers); |
2615 } else { | 2616 } else { |
2616 view()->dragTargetDragLeave(); | 2617 view()->dragTargetDragLeave(); |
2617 } | 2618 } |
2618 view()->dragSourceEndedAt(client_point, screen_point, current_drag_effect_); | 2619 view()->dragSourceEndedAt(client_point, screen_point, current_drag_effect_); |
2619 view()->dragSourceSystemDragEnded(); | 2620 view()->dragSourceSystemDragEnded(); |
2620 | 2621 |
2621 current_drag_data_.reset(); | 2622 current_drag_data_.reset(); |
2622 } | 2623 } |
2623 | 2624 |
2624 void EventSender::DoDragAfterMouseUp(const WebMouseEvent& e) { | 2625 void EventSender::DoDragAfterMouseUp(const WebMouseEvent& e) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2790 | 2791 |
2791 const blink::WebView* EventSender::view() const { | 2792 const blink::WebView* EventSender::view() const { |
2792 return web_test_proxy_base_->web_view(); | 2793 return web_test_proxy_base_->web_view(); |
2793 } | 2794 } |
2794 | 2795 |
2795 blink::WebView* EventSender::view() { | 2796 blink::WebView* EventSender::view() { |
2796 return web_test_proxy_base_->web_view(); | 2797 return web_test_proxy_base_->web_view(); |
2797 } | 2798 } |
2798 | 2799 |
2799 } // namespace test_runner | 2800 } // namespace test_runner |
OLD | NEW |