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

Issue 2294973002: Create MediaRouterActionController and MediaRouterUIService (Closed)

Created:
4 years, 3 months ago by takumif
Modified:
4 years, 3 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, media-router+watch_chromium.org, miu+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create MediaRouterActionController and MediaRouterUIService This CL is part 1 of 3 CLs to implement ephemeral toolbar icon for media router: 1. Implement MediaRouterActionController (this CL) 2. Show ephemeral icon for active local routes and issues [1] 3. Show ephemeral icon for open dialog The icon will be shown when the "always show icon" setting is on, or there is a local media route, an unresolved issue, or an open dialog. The MediaRouterActionController will be responsible for telling the ToolbarActionsModel to show/hide the MR icon. MediaRouterUIService is a KeyedService (a per-profile instance) that owns MediaRouterActionController. These CLs are a redesign of a previous CL [2], which has been reverted for its bugs. [1] https://codereview.chromium.org/2332693003/ [2] https://codereview.chromium.org/2155293002/ BUG=594577 Committed: https://crrev.com/be86872a218127fdf92001a1f69e044239a058b4 Cr-Commit-Position: refs/heads/master@{#419581}

Patch Set 1 #

Total comments: 51

Patch Set 2 : Address Derek and Mark's comments #

Total comments: 35

Patch Set 3 : Add MediaRouterUIService (KeyedService) #

Total comments: 40

Patch Set 4 : Rebase #

Patch Set 5 : Address Derek and Mark's comments #

Total comments: 19

Patch Set 6 : Address Devlin's comments #

Total comments: 31

Patch Set 7 : Address Mike and Devlin's comments #

Patch Set 8 : Address comments #

Patch Set 9 : Modify BUILD.gn files, rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+612 lines, -20 lines) Patch
M chrome/browser/extensions/component_migration_helper.h View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/component_migration_helper.cc View 1 2 3 4 5 6 2 chunks +15 lines, -8 lines 0 comments Download
M chrome/browser/media/router/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_router_factory.h View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/media/router/media_router_factory.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/media/router/media_router_factory_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/media/router/media_router_ui_service.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/media/router/media_router_ui_service.cc View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/media/router/media_router_ui_service_factory.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/media/router/media_router_ui_service_factory.cc View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/media/router/media_router_ui_service_factory_unittest.cc View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/media_router_action_controller.h View 1 2 3 4 5 6 1 chunk +77 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/media_router_action_controller.cc View 1 2 3 4 5 6 7 1 chunk +80 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc View 1 2 3 4 5 6 7 1 chunk +195 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (32 generated)
takumif
+mfoltz@ for MR-related files +msw@ for adding three files to c/b/ui/toolbar/ +anthonyvd@ for c/b/profiles/profile.cc Please ...
4 years, 3 months ago (2016-08-31 01:22:12 UTC) #6
imcheng
Drive-by with some high level comments. I am not a fan of introducing ui/toolbar dependency ...
4 years, 3 months ago (2016-08-31 05:39:49 UTC) #8
takumif
On 2016/08/31 05:39:49, imcheng wrote: > Drive-by with some high level comments. > > I ...
4 years, 3 months ago (2016-08-31 16:49:02 UTC) #9
anthonyvd
c/b/profiles/profile.cc lgtm
4 years, 3 months ago (2016-08-31 16:50:42 UTC) #10
mark a. foltz
We should come to consensus on the ownership bit. Ownership by the MR is a ...
4 years, 3 months ago (2016-09-02 22:19:10 UTC) #11
takumif
Derek and Mark, thanks for your comments. I believe the things we still have to ...
4 years, 3 months ago (2016-09-07 21:48:33 UTC) #12
imcheng
My take on the ownership model: I think ComponentActionDelegate interface makes sense (and it should ...
4 years, 3 months ago (2016-09-08 20:49:31 UTC) #13
takumif
On 2016/09/08 20:49:31, imcheng wrote: > My take on the ownership model: > > I ...
4 years, 3 months ago (2016-09-08 22:02:37 UTC) #14
mark a. foltz
Getting close; comments on everything but the unit tests. https://codereview.chromium.org/2294973002/diff/40001/chrome/browser/extensions/component_migration_helper.cc File chrome/browser/extensions/component_migration_helper.cc (right): https://codereview.chromium.org/2294973002/diff/40001/chrome/browser/extensions/component_migration_helper.cc#newcode96 chrome/browser/extensions/component_migration_helper.cc:96: ...
4 years, 3 months ago (2016-09-09 17:48:29 UTC) #15
imcheng
See inline: > The reason I wanted to make MRAction register with MRActionController is that ...
4 years, 3 months ago (2016-09-09 17:58:54 UTC) #16
imcheng
https://codereview.chromium.org/2294973002/diff/40001/chrome/browser/ui/toolbar/media_router_action_controller.h File chrome/browser/ui/toolbar/media_router_action_controller.h (right): https://codereview.chromium.org/2294973002/diff/40001/chrome/browser/ui/toolbar/media_router_action_controller.h#newcode24 chrome/browser/ui/toolbar/media_router_action_controller.h:24: // There should be one instance of this class ...
4 years, 3 months ago (2016-09-09 18:12:25 UTC) #17
mark a. foltz
On 2016/09/09 at 17:58:54, imcheng wrote: > See inline: > > > The reason I ...
4 years, 3 months ago (2016-09-09 18:14:45 UTC) #18
takumif
As per our discussion, I've added MediaRouterUIService, a KeyedService that owns MRActionController. The plan is ...
4 years, 3 months ago (2016-09-12 19:01:32 UTC) #21
mark a. foltz
LGTM This is much cleaner, thanks. Minor comments on naming and style. https://codereview.chromium.org/2294973002/diff/80001/chrome/browser/extensions/component_migration_helper.cc File chrome/browser/extensions/component_migration_helper.cc ...
4 years, 3 months ago (2016-09-13 18:23:05 UTC) #22
imcheng
https://codereview.chromium.org/2294973002/diff/80001/chrome/browser/extensions/component_migration_helper.h File chrome/browser/extensions/component_migration_helper.h (right): https://codereview.chromium.org/2294973002/diff/80001/chrome/browser/extensions/component_migration_helper.h#newcode113 chrome/browser/extensions/component_migration_helper.h:113: void SetComponentActionPref(const std::string& component_action_id, Why is SetComponentActionPref public? I ...
4 years, 3 months ago (2016-09-13 23:13:10 UTC) #23
takumif
Thanks for the comments! https://codereview.chromium.org/2294973002/diff/80001/chrome/browser/extensions/component_migration_helper.cc File chrome/browser/extensions/component_migration_helper.cc (right): https://codereview.chromium.org/2294973002/diff/80001/chrome/browser/extensions/component_migration_helper.cc#newcode142 chrome/browser/extensions/component_migration_helper.cc:142: bool ComponentMigrationHelper::GetComponentActionPref( On 2016/09/13 18:23:04, ...
4 years, 3 months ago (2016-09-14 04:00:52 UTC) #26
imcheng
lgtm
4 years, 3 months ago (2016-09-14 19:30:55 UTC) #27
takumif
+rdcronin@ This is part 1 of ephemeral MR icon redesign. MRActionController calls ComponentMigrationHelper::Get/SetComponentActionPref() and ToolbarActionsModel::Has/Add/RemoveComponentAction(). ...
4 years, 3 months ago (2016-09-15 17:46:51 UTC) #30
Devlin
https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/extensions/component_migration_helper.cc File chrome/browser/extensions/component_migration_helper.cc (right): https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/extensions/component_migration_helper.cc#newcode85 chrome/browser/extensions/component_migration_helper.cc:85: } else if (extension_was_installed) { Note: this is a ...
4 years, 3 months ago (2016-09-15 21:08:42 UTC) #31
takumif
Thanks for the comments. I'd like to land this CL and part 2 [1] before ...
4 years, 3 months ago (2016-09-16 21:04:05 UTC) #32
msw
Nice test; c/b/ui mostly lg, just minor comments. https://codereview.chromium.org/2294973002/diff/180001/chrome/browser/ui/toolbar/media_router_action_controller.cc File chrome/browser/ui/toolbar/media_router_action_controller.cc (right): https://codereview.chromium.org/2294973002/diff/180001/chrome/browser/ui/toolbar/media_router_action_controller.cc#newcode7 chrome/browser/ui/toolbar/media_router_action_controller.cc:7: #include ...
4 years, 3 months ago (2016-09-16 22:22:26 UTC) #33
Devlin
lgtm with nits https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/media/router/media_router_ui_service_factory_unittest.cc File chrome/browser/media/router/media_router_ui_service_factory_unittest.cc (right): https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/media/router/media_router_ui_service_factory_unittest.cc#newcode1 chrome/browser/media/router/media_router_ui_service_factory_unittest.cc:1: // Copyright 2016 The Chromium Authors. ...
4 years, 3 months ago (2016-09-16 22:37:32 UTC) #34
takumif
Thank you so much for reviewing! https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc File chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc (right): https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc#newcode28 chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc:28: if (action_id == ...
4 years, 3 months ago (2016-09-17 00:24:31 UTC) #38
msw
https://codereview.chromium.org/2294973002/diff/180001/chrome/browser/ui/toolbar/media_router_action_controller.cc File chrome/browser/ui/toolbar/media_router_action_controller.cc (right): https://codereview.chromium.org/2294973002/diff/180001/chrome/browser/ui/toolbar/media_router_action_controller.cc#newcode17 chrome/browser/ui/toolbar/media_router_action_controller.cc:17: const char (&kMediaRouterActionId)[] = On 2016/09/17 00:24:30, takumif wrote: ...
4 years, 3 months ago (2016-09-17 00:37:11 UTC) #39
Devlin
https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc File chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc (right): https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc#newcode28 chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc:28: if (action_id == kMediaRouterActionId) { On 2016/09/17 00:24:29, takumif ...
4 years, 3 months ago (2016-09-17 00:37:31 UTC) #40
takumif
https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc File chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc (right): https://codereview.chromium.org/2294973002/diff/160001/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc#newcode28 chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc:28: if (action_id == kMediaRouterActionId) { On 2016/09/17 00:37:31, Devlin ...
4 years, 3 months ago (2016-09-17 00:50:39 UTC) #41
msw
lgtm
4 years, 3 months ago (2016-09-19 15:42:14 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2294973002/320001
4 years, 3 months ago (2016-09-19 21:39:16 UTC) #58
commit-bot: I haz the power
Committed patchset #9 (id:320001)
4 years, 3 months ago (2016-09-19 21:54:33 UTC) #60
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 21:57:53 UTC) #62
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/be86872a218127fdf92001a1f69e044239a058b4
Cr-Commit-Position: refs/heads/master@{#419581}

Powered by Google App Engine
This is Rietveld 408576698