Commit 44a1d617 authored by Jennifer Apacible's avatar Jennifer Apacible Committed by Commit Bot

[Picture in Picture] Keep controls visible on mouse hover.

On Windows, hovering over the media controls triggers an ET_MOUSE_EXIT
MouseEvent. This is intended to only be caught when the mouse is
not within the video window bounds. On non-Windows, this is a noop.

Bug: 852131
Change-Id: I988d4483510c4eaafc9969edb26de407d77b0149
Reviewed-on: https://chromium-review.googlesource.com/1125139Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572402}
parent 30eefa3b
...@@ -481,7 +481,11 @@ void OverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) { ...@@ -481,7 +481,11 @@ void OverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) {
break; break;
case ui::ET_MOUSE_EXITED: case ui::ET_MOUSE_EXITED:
UpdateControlsVisibility(false); // On Windows, ui::ET_MOUSE_EXITED is triggered when hovering over the
// media controls because of the HitTest. This check ensures the controls
// are visible if the mouse is still over the window.
if (!GetVideoBounds().Contains(event->location()))
UpdateControlsVisibility(false);
break; break;
case ui::ET_MOUSE_RELEASED: case ui::ET_MOUSE_RELEASED:
......
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