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

Side by Side Diff: content/renderer/input/input_handler_proxy.cc

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add support for flow steps. Created 5 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 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 "content/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 InputHandlerProxy::EventDisposition 212 InputHandlerProxy::EventDisposition
213 InputHandlerProxy::HandleInputEventWithLatencyInfo( 213 InputHandlerProxy::HandleInputEventWithLatencyInfo(
214 const WebInputEvent& event, 214 const WebInputEvent& event,
215 ui::LatencyInfo* latency_info) { 215 ui::LatencyInfo* latency_info) {
216 DCHECK(input_handler_); 216 DCHECK(input_handler_);
217 217
218 if (uma_latency_reporting_enabled_) 218 if (uma_latency_reporting_enabled_)
219 ReportInputEventLatencyUma(event, *latency_info); 219 ReportInputEventLatencyUma(event, *latency_info);
220 220
221 TRACE_EVENT_WITH_FLOW0("toplevel", "InputHandlerProxy::HandleInputEventWithLat encyInfo",
222 TRACE_ID_DONT_MANGLE(latency_info->trace_id),
223 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT);
221 TRACE_EVENT_FLOW_STEP0("input,benchmark", 224 TRACE_EVENT_FLOW_STEP0("input,benchmark",
222 "LatencyInfo.Flow", 225 "LatencyInfo.Flow",
223 TRACE_ID_DONT_MANGLE(latency_info->trace_id), 226 TRACE_ID_DONT_MANGLE(latency_info->trace_id),
224 "HandleInputEventImpl"); 227 "HandleInputEventImpl");
225 228
226 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor = 229 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor =
227 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info); 230 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info);
228 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event); 231 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event);
229 return disposition; 232 return disposition;
230 } 233 }
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 // trigger a scroll, e.g., with a trivial time delta between fling updates. 970 // trigger a scroll, e.g., with a trivial time delta between fling updates.
968 // Return true in this case to prevent early fling termination. 971 // Return true in this case to prevent early fling termination.
969 if (std::abs(clipped_increment.width) < kScrollEpsilon && 972 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
970 std::abs(clipped_increment.height) < kScrollEpsilon) 973 std::abs(clipped_increment.height) < kScrollEpsilon)
971 return true; 974 return true;
972 975
973 return did_scroll; 976 return did_scroll;
974 } 977 }
975 978
976 } // namespace content 979 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698