New issue
Advanced search Search tips

Issue 842378 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 859216

Blocking:
issue 754101


Participants' hotlists:
Harmony-Cast-Dialog


Sign in to add a comment

[Harmony Cast Dialog] Don't hide the ephemeral icon while showing context menu

Project Member Reported by taku...@chromium.org, May 12 2018

Issue description

If the user clicks on the ephemeral Cast icon while the Harmony dialog is open and the icon is not pinned, the dialog closes and the icon goes away and immediately hides the context menu. Hence the ephemeral icon should not be hidden while we have the Media Router context menu.
 

Comment 1 by mfo...@chromium.org, Jun 25 2018

Labels: -Pri-2 Pri-1
This seems important, as otherwise there's no way to access the MR context menu from an unpinned toolbar icon?
Re #1, the only way to do it is if you had a Cast device and were actively casting to it.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8

commit 6cf891f99d20238a9365fcde8bb995c4a7ec1cb8
Author: Takumi Fujimoto <takumif@chromium.org>
Date: Fri Jul 06 22:50:50 2018

Don't hide the ephemeral Cast icon when action context menu is shown

When the user opens the Cast dialog, then right clicks on the ephemeral
Cast icon, the dialog closes and the ephemeral icon disappears without
showing a context menu. This CL fixes that by allowing the context menu
to show before the dialog is closed, and keeping the ephemeral icon
while the context menu is shown.

Bug:  842378 
Change-Id: I89b1a4fa3690cb617a95d3fa9f0e79ba789a8864
Reviewed-on: https://chromium-review.googlesource.com/1052807
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573103}
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_action.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_action_controller.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_action_controller.h
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_contextual_menu.h
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/toolbar/mock_media_router_action_controller.h
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/webui/media_router/media_router_ui_service.cc
[modify] https://crrev.com/6cf891f99d20238a9365fcde8bb995c4a7ec1cb8/chrome/browser/ui/webui/media_router/media_router_ui_service.h

Status: Fixed (was: Started)
Status: Started (was: Fixed)
This issue still exists on Windows.
Labels: Target-70
Labels: -M-69 M-70
On Windows, the dialog gets hidden at mouse press, and the context menu doesn't show until mouse release, at which point it doesn't happen because the icon is gone.

One way to resolve this is to have ToolbarActionView notify ToolbarActionViewController (extended by MediaRouterAction) of the mouse press, and have MRA notify MediaRouterActionController not to hide the icon yet. Upon mouse release, we must hide the icon through the same notification chain unless a context menu was shown.

Another way is to fix this during our conversion of the icon into a trusted area icon. In this case, the MRA-equivalent would handle the mouse events itself, and can choose to show the context menu at mouse press. If we decide that we'd still want to show the menu at mouse release on Windows, then it'd have to notify MRAC like in the above case.

Moving the icon to the trusted area would be a somewhat significant work ( issue 859216 ) so I didn't want to make it a launch blocker for the Harmony dialog, but it also may resolve the issue of the dialog moving while the icon is animated into position ( issue 861838 ). I'll look into both alternatives.
Cc: bsep@chromium.org
Bret, do you see a way to fix this that is simpler than the options I wrote above?
Cc: powerb@chromium.org
Blockedon: 859216
Labels: -Target-70 -M-70 Target-71 M-71
Status: Fixed (was: Started)

Sign in to add a comment