Commit bb025549 authored by Jennifer Apacible's avatar Jennifer Apacible Committed by Commit Bot

[Picture in Picture] Hide controls 2.5s after keyboard interaction.

Previously, only gestures (i.e. tap) would trigger the controls to hide
after a certain period of time. This change also adds this behavior for
keyboard interaction to avoid forcing the user to blur the window to
hide the controls.

Bug: 879294
Change-Id: I697099c317c05a8e206acfab24848b8fd0ce149d
Reviewed-on: https://chromium-review.googlesource.com/1197408Reviewed-by: default avatarCJ DiMeglio <lethalantidote@chromium.org>
Commit-Queue: apacible <apacible@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587817}
parent e89e923b
...@@ -600,6 +600,10 @@ void OverlayWindowViews::OnNativeWidgetBeginUserBoundsChange() { ...@@ -600,6 +600,10 @@ void OverlayWindowViews::OnNativeWidgetBeginUserBoundsChange() {
} }
void OverlayWindowViews::OnKeyEvent(ui::KeyEvent* event) { void OverlayWindowViews::OnKeyEvent(ui::KeyEvent* event) {
// Every time a user uses a keyboard to interact on the window, restart the
// timer to automatically hide the controls.
hide_controls_timer_.Reset();
// Any keystroke will make the controls visible, if not already. The Tab key // Any keystroke will make the controls visible, if not already. The Tab key
// needs to be handled separately. // needs to be handled separately.
// If the controls are already visible, this is a no-op. // If the controls are already visible, this is a no-op.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment