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

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

Issue 17757002: Add UMA/Telemetry stats for touch event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address various issues Created 7 years, 5 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 return; 1798 return;
1799 1799
1800 ui::EventResult result = (ack_result == 1800 ui::EventResult result = (ack_result ==
1801 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; 1801 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED;
1802 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), 1802 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(),
1803 end = events.end(); iter != end; ++iter) { 1803 end = events.end(); iter != end; ++iter) {
1804 (*iter)->latency()->AddLatencyNumber( 1804 (*iter)->latency()->AddLatencyNumber(
1805 ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT, 1805 ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT,
1806 static_cast<int64>(ack_result), 1806 static_cast<int64>(ack_result),
1807 0); 1807 0);
1808 host_->ComputeTouchLatency(*((*iter)->latency()));
1808 root->ProcessedTouchEvent((*iter), window_, result); 1809 root->ProcessedTouchEvent((*iter), window_, result);
1809 } 1810 }
1810 } 1811 }
1811 1812
1812 SmoothScrollGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( 1813 SmoothScrollGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture(
1813 bool scroll_down, 1814 bool scroll_down,
1814 int pixels_to_scroll, 1815 int pixels_to_scroll,
1815 int mouse_event_x, 1816 int mouse_event_x,
1816 int mouse_event_y) { 1817 int mouse_event_y) {
1817 return new TouchSmoothScrollGestureAura(scroll_down, 1818 return new TouchSmoothScrollGestureAura(scroll_down,
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 RenderWidgetHost* widget) { 3013 RenderWidgetHost* widget) {
3013 return new RenderWidgetHostViewAura(widget); 3014 return new RenderWidgetHostViewAura(widget);
3014 } 3015 }
3015 3016
3016 // static 3017 // static
3017 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3018 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3018 GetScreenInfoForWindow(results, NULL); 3019 GetScreenInfoForWindow(results, NULL);
3019 } 3020 }
3020 3021
3021 } // namespace content 3022 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698