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

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, 7 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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type, 581 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type,
582 WebGestureDevice sourceDevice, 582 WebGestureDevice sourceDevice,
583 const ui::LatencyInfo& ui_latency) { 583 const ui::LatencyInfo& ui_latency) {
584 host_->ForwardGestureEventWithLatencyInfo( 584 host_->ForwardGestureEventWithLatencyInfo(
585 SyntheticWebGestureEventBuilder::Build(type, sourceDevice), 585 SyntheticWebGestureEventBuilder::Build(type, sourceDevice),
586 ui_latency); 586 ui_latency);
587 } 587 }
588 588
589 // Set the timestamp for the touch-event. 589 // Set the timestamp for the touch-event.
590 void SetTouchTimestamp(base::TimeDelta timestamp) { 590 void SetTouchTimestamp(base::TimeTicks timestamp) {
591 touch_event_.SetTimestamp(timestamp); 591 touch_event_.SetTimestamp(timestamp);
592 } 592 }
593 593
594 // Sends a touch event (irrespective of whether the page has a touch-event 594 // Sends a touch event (irrespective of whether the page has a touch-event
595 // handler or not). 595 // handler or not).
596 uint32_t SendTouchEvent() { 596 uint32_t SendTouchEvent() {
597 uint32_t touch_event_id = touch_event_.uniqueTouchEventId; 597 uint32_t touch_event_id = touch_event_.uniqueTouchEventId;
598 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo()); 598 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo());
599 599
600 touch_event_.ResetPoints(); 600 touch_event_.ResetPoints();
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 ui::LatencyInfo()); 1672 ui::LatencyInfo());
1673 1673
1674 1674
1675 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). 1675 // Tests RWHI::ForwardWheelEventWithLatencyInfo().
1676 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); 1676 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo());
1677 1677
1678 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); 1678 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1679 } 1679 }
1680 1680
1681 } // namespace content 1681 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698