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

Side by Side Diff: ash/touch/touch_hud_debug.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
« no previous file with comments | « ash/system/toast/toast_manager_unittest.cc ('k') | ash/touch/touch_observer_hud_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/touch/touch_hud_debug.h" 5 #include "ash/touch/touch_hud_debug.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return 0; 89 return 0;
90 } 90 }
91 91
92 // A TouchPointLog represents a single touch-event of a touch point. 92 // A TouchPointLog represents a single touch-event of a touch point.
93 struct TouchPointLog { 93 struct TouchPointLog {
94 public: 94 public:
95 explicit TouchPointLog(const ui::TouchEvent& touch) 95 explicit TouchPointLog(const ui::TouchEvent& touch)
96 : id(touch.touch_id()), 96 : id(touch.touch_id()),
97 type(touch.type()), 97 type(touch.type()),
98 location(touch.root_location()), 98 location(touch.root_location()),
99 timestamp(touch.time_stamp().InMillisecondsF()), 99 timestamp((touch.time_stamp() - base::TimeTicks()).InMillisecondsF()),
100 radius_x(touch.pointer_details().radius_x), 100 radius_x(touch.pointer_details().radius_x),
101 radius_y(touch.pointer_details().radius_y), 101 radius_y(touch.pointer_details().radius_y),
102 pressure(touch.pointer_details().force), 102 pressure(touch.pointer_details().force),
103 tracking_id(GetTrackingId(touch)), 103 tracking_id(GetTrackingId(touch)),
104 source_device(touch.source_device_id()) {} 104 source_device(touch.source_device_id()) {}
105 105
106 // Populates a dictionary value with all the information about the touch 106 // Populates a dictionary value with all the information about the touch
107 // point. 107 // point.
108 std::unique_ptr<base::DictionaryValue> GetAsDictionary() const { 108 std::unique_ptr<base::DictionaryValue> GetAsDictionary() const {
109 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 109 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 RootWindowController* controller) { 473 RootWindowController* controller) {
474 controller->set_touch_hud_debug(this); 474 controller->set_touch_hud_debug(this);
475 } 475 }
476 476
477 void TouchHudDebug::UnsetHudForRootWindowController( 477 void TouchHudDebug::UnsetHudForRootWindowController(
478 RootWindowController* controller) { 478 RootWindowController* controller) {
479 controller->set_touch_hud_debug(NULL); 479 controller->set_touch_hud_debug(NULL);
480 } 480 }
481 481
482 } // namespace ash 482 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/toast/toast_manager_unittest.cc ('k') | ash/touch/touch_observer_hud_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698