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

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: add LatencyInfo::FindLatency() && Only use one metric for touch ack latency 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 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 aura::RootWindow* root = window_->GetRootWindow(); 1795 aura::RootWindow* root = window_->GetRootWindow();
1796 // |root| is NULL during tests. 1796 // |root| is NULL during tests.
1797 if (!root) 1797 if (!root)
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, 0, 0);
1806 static_cast<int64>(ack_result), 1806 host_->ComputeTouchLatency(*((*iter)->latency()));
sadrul 2013/06/27 17:44:01 Why is this called from here? Why not from RWHI::O
Yufeng Shen (Slow to review) 2013/06/27 19:01:03 right, it is better to be in RWHI or touch_event_q
1807 0);
1808 root->ProcessedTouchEvent((*iter), window_, result); 1807 root->ProcessedTouchEvent((*iter), window_, result);
1809 } 1808 }
1810 } 1809 }
1811 1810
1812 SmoothScrollGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( 1811 SmoothScrollGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture(
1813 bool scroll_down, 1812 bool scroll_down,
1814 int pixels_to_scroll, 1813 int pixels_to_scroll,
1815 int mouse_event_x, 1814 int mouse_event_x,
1816 int mouse_event_y) { 1815 int mouse_event_y) {
1817 return new TouchSmoothScrollGestureAura(scroll_down, 1816 return new TouchSmoothScrollGestureAura(scroll_down,
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 RenderWidgetHost* widget) { 3011 RenderWidgetHost* widget) {
3013 return new RenderWidgetHostViewAura(widget); 3012 return new RenderWidgetHostViewAura(widget);
3014 } 3013 }
3015 3014
3016 // static 3015 // static
3017 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3016 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3018 GetScreenInfoForWindow(results, NULL); 3017 GetScreenInfoForWindow(results, NULL);
3019 } 3018 }
3020 3019
3021 } // namespace content 3020 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698