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 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 } | 2645 } |
2646 | 2646 |
2647 void EventSender::FinishDragAndDrop(const WebMouseEvent& e, | 2647 void EventSender::FinishDragAndDrop(const WebMouseEvent& e, |
2648 blink::WebDragOperation drag_effect) { | 2648 blink::WebDragOperation drag_effect) { |
2649 WebPoint client_point(e.x, e.y); | 2649 WebPoint client_point(e.x, e.y); |
2650 WebPoint screen_point(e.globalX, e.globalY); | 2650 WebPoint screen_point(e.globalX, e.globalY); |
2651 current_drag_effect_ = drag_effect; | 2651 current_drag_effect_ = drag_effect; |
2652 if (current_drag_effect_) { | 2652 if (current_drag_effect_) { |
2653 // Specifically pass any keyboard modifiers to the drop method. This allows | 2653 // Specifically pass any keyboard modifiers to the drop method. This allows |
2654 // tests to control the drop type (i.e. copy or move). | 2654 // tests to control the drop type (i.e. copy or move). |
2655 view()->dragTargetDrop(client_point, screen_point, e.modifiers); | 2655 view()->dragTargetDrop(current_drag_data_, client_point, screen_point, |
| 2656 e.modifiers); |
2656 } else { | 2657 } else { |
2657 view()->dragTargetDragLeave(); | 2658 view()->dragTargetDragLeave(); |
2658 } | 2659 } |
2659 view()->dragSourceEndedAt(client_point, screen_point, current_drag_effect_); | 2660 view()->dragSourceEndedAt(client_point, screen_point, current_drag_effect_); |
2660 view()->dragSourceSystemDragEnded(); | 2661 view()->dragSourceSystemDragEnded(); |
2661 | 2662 |
2662 current_drag_data_.reset(); | 2663 current_drag_data_.reset(); |
2663 } | 2664 } |
2664 | 2665 |
2665 void EventSender::DoDragAfterMouseUp(const WebMouseEvent& e) { | 2666 void EventSender::DoDragAfterMouseUp(const WebMouseEvent& e) { |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 | 2821 |
2821 const blink::WebView* EventSender::view() const { | 2822 const blink::WebView* EventSender::view() const { |
2822 return web_test_proxy_base_->web_view(); | 2823 return web_test_proxy_base_->web_view(); |
2823 } | 2824 } |
2824 | 2825 |
2825 blink::WebView* EventSender::view() { | 2826 blink::WebView* EventSender::view() { |
2826 return web_test_proxy_base_->web_view(); | 2827 return web_test_proxy_base_->web_view(); |
2827 } | 2828 } |
2828 | 2829 |
2829 } // namespace test_runner | 2830 } // namespace test_runner |
OLD | NEW |