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

Side by Side Diff: ui/events/event.cc

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error Created 7 years, 2 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 "ui/events/event.h" 5 #include "ui/events/event.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #endif 9 #endif
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void Event::InitWithNativeEvent(const base::NativeEvent& native_event) { 234 void Event::InitWithNativeEvent(const base::NativeEvent& native_event) {
235 native_event_ = native_event; 235 native_event_ = native_event;
236 } 236 }
237 237
238 void Event::InitLatencyInfo() { 238 void Event::InitLatencyInfo() {
239 latency_.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 239 latency_.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
240 0, 240 0,
241 0, 241 0,
242 base::TimeTicks::FromInternalValue( 242 base::TimeTicks::FromInternalValue(
243 time_stamp_.ToInternalValue()), 243 time_stamp_.ToInternalValue()),
244 1); 244 1,
245 true);
245 latency_.AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); 246 latency_.AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0);
246 } 247 }
247 248
248 //////////////////////////////////////////////////////////////////////////////// 249 ////////////////////////////////////////////////////////////////////////////////
249 // CancelModeEvent 250 // CancelModeEvent
250 251
251 CancelModeEvent::CancelModeEvent() 252 CancelModeEvent::CancelModeEvent()
252 : Event(ET_CANCEL_MODE, base::TimeDelta(), 0) { 253 : Event(ET_CANCEL_MODE, base::TimeDelta(), 0) {
253 set_cancelable(false); 254 set_cancelable(false);
254 } 255 }
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 int GestureEvent::GetLowestTouchId() const { 716 int GestureEvent::GetLowestTouchId() const {
716 if (touch_ids_bitfield_ == 0) 717 if (touch_ids_bitfield_ == 0)
717 return -1; 718 return -1;
718 int i = -1; 719 int i = -1;
719 // Find the index of the least significant 1 bit 720 // Find the index of the least significant 1 bit
720 while (!(1 << ++i & touch_ids_bitfield_)); 721 while (!(1 << ++i & touch_ids_bitfield_));
721 return i; 722 return i;
722 } 723 }
723 724
724 } // namespace ui 725 } // namespace ui
OLDNEW
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | ui/events/gestures/gesture_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698