New issue
Advanced search Search tips

Issue 597778 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Media Router] Remove references to MediaRouterMojoImpl from UI code

Project Member Reported by mfo...@chromium.org, Mar 24 2016

Issue description

Currently code in the Media Router UI reaches down into MediaRouterMojoImpl to grab the extension id.  This is a layering violation and should be cleaned up.  It seems like we should just hard code the component extension id.

Search the code for this issue number to find the places to fix.

 

Comment 1 by mfo...@chromium.org, Mar 24 2016

I believe we can also remove the media_router_extension_id() API as well.

Comment 2 by sko...@chromium.org, Mar 30 2016

Status: Available (was: Untriaged)

Comment 3 by mfo...@chromium.org, May 12 2016

Labels: -Hotlist-Fixit Hotlist-CodeHealth

Comment 4 by mfo...@chromium.org, May 12 2016

Cc: mfo...@chromium.org

Comment 5 by mfo...@chromium.org, May 10 2017

Labels: Hotlist-Fixit-PE2017

Comment 6 by mfo...@chromium.org, May 10 2017

Components: Internals>Cast>UI

Comment 7 by mfo...@chromium.org, May 10 2017

Components: -Blink>PresentationAPI
Not just a layering violation, this code is plain wrong. In tests the dynamic type of router_ could be MockMediaRouter.
Owner: taku...@chromium.org
Status: Assigned (was: Available)
I'm moving extension-related code out of MediaRouterMojoImpl into a new class media_router::EventPageRequestManager here [1], so I can add something like EventPageRequestManager::kExtensionId.

[1] https://codereview.chromium.org/2949933002/

Comment 10 by p...@chromium.org, Jul 6 2017

Cc: p...@chromium.org
takumif@: how soon do you think you will be able to make that change? I have a quick fix for the MediaRouterUITest.SetsForcedCastModeWithPresentationURLs test to unblock  issue 727993  and I was wondering whether to bother with that or to wait for your change.
The fix will be simple once 2949933002 lands, so I should be able to fix it in a few days.
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 10 2017

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

commit bae32143ddf7c4cf69f0f71e260a194648e0b27b
Author: takumif <takumif@chromium.org>
Date: Mon Jul 10 23:24:07 2017

[Media Router] Remove the extension ID getter from MRMojoImpl

This CL removes the media_route_provider_extension_id() getter from
MediaRouterMojoImpl, which was previously being accessed by static-casting
MediaRouter into MediaRouterMojoImpl. The getter in EventPageRequestManager is
now used.

It seems that we cannot simply hard-code the ID, since it's different between
dev and release builds of the component extension.

BUG= 597778 
BUG= 727993 

Review-Url: https://codereview.chromium.org/2970273002
Cr-Commit-Position: refs/heads/master@{#485439}

[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/ui/webui/cast/cast_ui.cc
[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/bae32143ddf7c4cf69f0f71e260a194648e0b27b/chrome/browser/ui/webui/media_router/media_router_ui.h

Status: Fixed (was: Assigned)
Labels: -Hotlist-Fixit-PE2017

Sign in to add a comment