| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1656 break; | 1656 break; |
| 1657 } | 1657 } |
| 1658 } | 1658 } |
| 1659 delegate_->PrintMessage(std::string("Filename being dragged: ") + | 1659 delegate_->PrintMessage(std::string("Filename being dragged: ") + |
| 1660 filename.utf8().data() + "\n"); | 1660 filename.utf8().data() + "\n"); |
| 1661 } | 1661 } |
| 1662 | 1662 |
| 1663 void EventSender::GestureFlingCancel() { | 1663 void EventSender::GestureFlingCancel() { |
| 1664 WebGestureEvent event; | 1664 WebGestureEvent event; |
| 1665 event.type = WebInputEvent::GestureFlingCancel; | 1665 event.type = WebInputEvent::GestureFlingCancel; |
| 1666 // Generally it won't matter what device we use here, and since it might |
| 1667 // be cumbersome to expect all callers to specify a device, we'll just |
| 1668 // choose Touchpad here. |
| 1669 event.sourceDevice = blink::WebGestureDeviceTouchpad; |
| 1666 event.timeStampSeconds = GetCurrentEventTimeSec(); | 1670 event.timeStampSeconds = GetCurrentEventTimeSec(); |
| 1667 | 1671 |
| 1668 if (force_layout_on_events_) | 1672 if (force_layout_on_events_) |
| 1669 view_->layout(); | 1673 view_->layout(); |
| 1670 | 1674 |
| 1671 HandleInputEventOnViewOrPopup(event); | 1675 HandleInputEventOnViewOrPopup(event); |
| 1672 } | 1676 } |
| 1673 | 1677 |
| 1674 void EventSender::GestureFlingStart(float x, | 1678 void EventSender::GestureFlingStart(float x, |
| 1675 float y, | 1679 float y, |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 last_event_timestamp_ = event.timeStampSeconds; | 2531 last_event_timestamp_ = event.timeStampSeconds; |
| 2528 | 2532 |
| 2529 if (WebPagePopup* popup = view_->pagePopup()) { | 2533 if (WebPagePopup* popup = view_->pagePopup()) { |
| 2530 if (!WebInputEvent::isKeyboardEventType(event.type)) | 2534 if (!WebInputEvent::isKeyboardEventType(event.type)) |
| 2531 return popup->handleInputEvent(event); | 2535 return popup->handleInputEvent(event); |
| 2532 } | 2536 } |
| 2533 return view_->handleInputEvent(event); | 2537 return view_->handleInputEvent(event); |
| 2534 } | 2538 } |
| 2535 | 2539 |
| 2536 } // namespace test_runner | 2540 } // namespace test_runner |
| OLD | NEW |