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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2756893002: Add Keyboard Latency UMA Metrics. (Closed)
Patch Set: Fix test issue Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8d2390a91305f963ac4fda2f743aedaa71d82852..a1fd09a794e19631c055942cadc4c29ae9600da7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1156,13 +1156,15 @@ void RenderWidgetHostImpl::ForwardTouchEventWithLatencyInfo(
input_router_->SendTouchEvent(touch_with_latency);
}
-void RenderWidgetHostImpl::ForwardKeyboardEvent(
- const NativeWebKeyboardEvent& key_event) {
- ForwardKeyboardEventWithCommands(key_event, nullptr, nullptr);
+void RenderWidgetHostImpl::ForwardKeyboardEventWithLatencyInfo(
+ const NativeWebKeyboardEvent& key_event,
+ const ui::LatencyInfo& ui_latency) {
+ ForwardKeyboardEventWithCommands(key_event, ui_latency, nullptr, nullptr);
}
void RenderWidgetHostImpl::ForwardKeyboardEventWithCommands(
const NativeWebKeyboardEvent& key_event,
+ const ui::LatencyInfo& ui_latency,
const std::vector<EditCommand>* commands,
bool* update_event) {
TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardKeyboardEvent");
@@ -1239,9 +1241,8 @@ void RenderWidgetHostImpl::ForwardKeyboardEventWithCommands(
if (touch_emulator_ && touch_emulator_->HandleKeyboardEvent(key_event))
return;
- ui::LatencyInfo latency_info(ui::SourceEventType::OTHER);
NativeWebKeyboardEventWithLatencyInfo key_event_with_latency(key_event,
- latency_info);
+ ui_latency);
key_event_with_latency.event.isBrowserShortcut = is_shortcut;
DispatchInputEventWithLatencyInfo(key_event, &key_event_with_latency.latency);
// TODO(foolip): |InputRouter::SendKeyboardEvent()| may filter events, in

Powered by Google App Engine
This is Rietveld 408576698