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

Unified Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

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: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index c04cf5d03a4506bf573ec02dd568f41f7169c695..e4ebafb1f661c19114e70fd99d03f9d8b934c8da 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -295,16 +295,15 @@ const int kMaxCharacters = 4000;
if ([event type] != NSKeyDown && [event type] != NSKeyUp)
return NO;
- // Forward the event to the renderer.
- // TODO(rohitrao): Should this call -[BaseView keyEvent:]? Is there code in
- // that function that we want to keep or avoid? Calling
- // |ForwardKeyboardEvent()| directly ignores edit commands, which breaks
- // cmd-up/down if we ever decide to include |moveToBeginningOfDocument:| in
- // the list above.
+ // Forward the event to the renderer. TODO(rohitrao): Should this call
mfomitchev 2017/04/04 14:59:05 TODO should be on a new line?
tdresser 2017/05/01 15:49:21 Done.
+ // -[BaseView keyEvent:]? Is there code in that function that we want to
+ // keep or avoid? Calling |ForwardKeyboardEventWithLatencyInfo()| directly
+ // ignores edit commands, which breaks cmd-up/down if we ever decide to
+ // include |moveToBeginningOfDocument:| in the list above.
content::RenderViewHost* render_view_host =
web_contents->GetRenderViewHost();
- render_view_host->GetWidget()->ForwardKeyboardEvent(
- NativeWebKeyboardEvent(event));
+ render_view_host->GetWidget()->ForwardKeyboardEventWithLatencyInfo(
+ NativeWebKeyboardEvent(event), ui::LatencyInfo());
mfomitchev 2017/04/04 14:59:05 Do we care about latency info on Mac? If yes, mayb
tdresser 2017/05/01 15:49:21 We have terrible coverage currently. I've added t
return YES;
}

Powered by Google App Engine
This is Rietveld 408576698