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

Unified Diff: ui/chromeos/touch_exploration_controller.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 side-by-side diff with in-line comments
Download patch
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index d4399b1eb45969144fce501748b6a6d8eeca3d21..a273ab8e9bac87a3fcc8c219045ba9b2bf5bcdb3 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -688,12 +688,11 @@ ui::EventRewriteStatus TouchExplorationController::InTwoFingerTap(
return ui::EVENT_REWRITE_DISCARD;
}
-base::TimeDelta TouchExplorationController::Now() {
+base::TimeTicks TouchExplorationController::Now() {
if (tick_clock_) {
// This is the same as what EventTimeForNow() does, but here we do it
// with a clock that can be replaced with a simulated clock for tests.
- return base::TimeDelta::FromInternalValue(
- tick_clock_->NowTicks().ToInternalValue());
+ return tick_clock_->NowTicks();
}
return ui::EventTimeForNow();
}
@@ -1019,9 +1018,8 @@ TouchExplorationController::CreateMouseMoveEvent(const gfx::PointF& location,
// event to the new ChromeVox background page via the automation api.
flags |= ui::EF_COMMAND_DOWN;
- std::unique_ptr<ui::MouseEvent> event(
- new ui::MouseEvent(ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(),
- ui::EventTimeForNow(), flags, 0));
+ std::unique_ptr<ui::MouseEvent> event(new ui::MouseEvent(
+ ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(), Now(), flags, 0));
event->set_location_f(location);
event->set_root_location_f(location);
return event;

Powered by Google App Engine
This is Rietveld 408576698