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

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

Issue 2756893002: Add Keyboard Latency UMA Metrics. (Closed)
Patch Set: Fix a few compile issues. Created 3 years, 7 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_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 417056c13d69feab6cedd876fa5719b26356edfa..69d93dc5ced185969fdad750f1445a343c706d8e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1225,8 +1225,9 @@ void RenderWidgetHostViewAura::InsertChar(const ui::KeyEvent& event) {
if (host_ && (event_handler_->accept_return_character() ||
event.GetCharacter() != ui::VKEY_RETURN)) {
// Send a blink::WebInputEvent::Char event to |host_|.
- ForwardKeyboardEvent(NativeWebKeyboardEvent(event, event.GetCharacter()),
- nullptr);
+ ForwardKeyboardEventWithLatencyInfo(
+ NativeWebKeyboardEvent(event, event.GetCharacter()), *event.latency(),
+ nullptr);
}
}
@@ -2229,8 +2230,9 @@ void RenderWidgetHostViewAura::DetachFromInputMethod() {
input_method->DetachTextInputClient(this);
}
-void RenderWidgetHostViewAura::ForwardKeyboardEvent(
+void RenderWidgetHostViewAura::ForwardKeyboardEventWithLatencyInfo(
const NativeWebKeyboardEvent& event,
+ const ui::LatencyInfo& latency,
bool* update_event) {
RenderWidgetHostImpl* target_host = host_;
@@ -2257,13 +2259,14 @@ void RenderWidgetHostViewAura::ForwardKeyboardEvent(
it->argument()));
}
- target_host->ForwardKeyboardEventWithCommands(event, &edit_commands,
- update_event);
+ target_host->ForwardKeyboardEventWithCommands(event, latency,
+ &edit_commands, update_event);
return;
}
#endif
- target_host->ForwardKeyboardEventWithCommands(event, nullptr, update_event);
+ target_host->ForwardKeyboardEventWithCommands(event, latency, nullptr,
+ update_event);
}
void RenderWidgetHostViewAura::CreateSelectionController() {

Powered by Google App Engine
This is Rietveld 408576698