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

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <tuple> 9 #include <tuple>
10 10
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type, 582 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type,
583 WebGestureDevice sourceDevice, 583 WebGestureDevice sourceDevice,
584 const ui::LatencyInfo& ui_latency) { 584 const ui::LatencyInfo& ui_latency) {
585 host_->ForwardGestureEventWithLatencyInfo( 585 host_->ForwardGestureEventWithLatencyInfo(
586 SyntheticWebGestureEventBuilder::Build(type, sourceDevice), 586 SyntheticWebGestureEventBuilder::Build(type, sourceDevice),
587 ui_latency); 587 ui_latency);
588 } 588 }
589 589
590 // Set the timestamp for the touch-event. 590 // Set the timestamp for the touch-event.
591 void SetTouchTimestamp(base::TimeDelta timestamp) { 591 void SetTouchTimestamp(base::TimeTicks timestamp) {
592 touch_event_.SetTimestamp(timestamp); 592 touch_event_.SetTimestamp(timestamp);
593 } 593 }
594 594
595 // Sends a touch event (irrespective of whether the page has a touch-event 595 // Sends a touch event (irrespective of whether the page has a touch-event
596 // handler or not). 596 // handler or not).
597 uint32_t SendTouchEvent() { 597 uint32_t SendTouchEvent() {
598 uint32_t touch_event_id = touch_event_.uniqueTouchEventId; 598 uint32_t touch_event_id = touch_event_.uniqueTouchEventId;
599 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo()); 599 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo());
600 600
601 touch_event_.ResetPoints(); 601 touch_event_.ResetPoints();
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 ui::LatencyInfo()); 1673 ui::LatencyInfo());
1674 1674
1675 1675
1676 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). 1676 // Tests RWHI::ForwardWheelEventWithLatencyInfo().
1677 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); 1677 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo());
1678 1678
1679 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); 1679 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1680 } 1680 }
1681 1681
1682 } // namespace content 1682 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698