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

Issue 1612203002: [Media Router] Adds a contextual menu item to remove the MR component action. (Closed)

Created:
4 years, 11 months ago by mark a. foltz
Modified:
4 years, 10 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router] Adds a contextual menu item to remove the MR component action. This adds a menu item to remove the MR component action from the toolbar. It sets a pref so this preference is respected across sessions. The user can restore the action by reinstalling the Cast extension from the Web Store. (They may have to reload the Web Store page immediately after installation to do so.) BUG=576362 TESTED=Unit test, manually tested Committed: https://crrev.com/95cfa837a726c4400e025e826fcaddf1bfc751eb Cr-Commit-Position: refs/heads/master@{#371629}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Respond to apacible@ comments #

Total comments: 6

Patch Set 3 : Respond to pkasting@ comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -25 lines) Patch
M chrome/app/chrome_command_ids.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/component_migration_helper.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/component_migration_helper.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/component_migration_helper_unittest.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.cc View 1 2 5 chunks +14 lines, -24 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_model.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
mark a. foltz
apacible@ for everything mek@ for browser/extensions and browser/ui/toolbar cpu@ for chrome/app PTAL
4 years, 11 months ago (2016-01-21 23:16:32 UTC) #2
apacible
https://codereview.chromium.org/1612203002/diff/1/chrome/app/chrome_command_ids.h File chrome/app/chrome_command_ids.h (right): https://codereview.chromium.org/1612203002/diff/1/chrome/app/chrome_command_ids.h#newcode351 chrome/app/chrome_command_ids.h:351: #define IDC_MEDIA_ROUTER_REMOVE_FROM_CHROME 51204 nit: Since this command is usable ...
4 years, 11 months ago (2016-01-22 16:53:55 UTC) #3
mark a. foltz
https://codereview.chromium.org/1612203002/diff/1/chrome/app/chrome_command_ids.h File chrome/app/chrome_command_ids.h (right): https://codereview.chromium.org/1612203002/diff/1/chrome/app/chrome_command_ids.h#newcode351 chrome/app/chrome_command_ids.h:351: #define IDC_MEDIA_ROUTER_REMOVE_FROM_CHROME 51204 On 2016/01/22 at 16:53:55, apacible wrote: ...
4 years, 11 months ago (2016-01-22 18:01:55 UTC) #4
apacible
lgtm when strings checked. https://codereview.chromium.org/1612203002/diff/1/chrome/browser/ui/toolbar/media_router_contextual_menu.cc File chrome/browser/ui/toolbar/media_router_contextual_menu.cc (right): https://codereview.chromium.org/1612203002/diff/1/chrome/browser/ui/toolbar/media_router_contextual_menu.cc#newcode34 chrome/browser/ui/toolbar/media_router_contextual_menu.cc:34: IDS_EXTENSIONS_UNINSTALL); On 2016/01/22 18:01:55, mark ...
4 years, 11 months ago (2016-01-22 18:30:46 UTC) #5
Marijn Kruisselbrink
On 2016/01/21 at 23:16:32, mfoltz wrote: > mek@ for browser/extensions and browser/ui/toolbar lgtm, although I'm ...
4 years, 11 months ago (2016-01-22 19:19:34 UTC) #6
mark a. foltz
+finnur for toolbar related changes Marjin: Thanks for the LGTM and heads up. Finnur: Devlin ...
4 years, 11 months ago (2016-01-22 19:54:36 UTC) #8
Finnur
On 2016/01/22 19:54:36, mark a. foltz wrote: > +finnur for toolbar related changes I'm neither ...
4 years, 11 months ago (2016-01-25 10:10:17 UTC) #9
mark a. foltz
On 2016/01/25 at 10:10:17, finnur wrote: > On 2016/01/22 19:54:36, mark a. foltz wrote: > ...
4 years, 11 months ago (2016-01-25 19:32:02 UTC) #10
mark a. foltz
Now adding +pkasting@ to review c/b/ui/toolbar changes, at the suggestion of apacible@ :) PTAL
4 years, 11 months ago (2016-01-25 21:41:44 UTC) #12
cpu_(ooo_6.6-7.5)
rubberstamp lgtm for command_ids header.
4 years, 11 months ago (2016-01-25 23:30:34 UTC) #13
Peter Kasting
LGTM with one major question. https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc File chrome/browser/ui/toolbar/media_router_contextual_menu.cc (right): https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc#newcode57 chrome/browser/ui/toolbar/media_router_contextual_menu.cc:57: base::string16 MediaRouterContextualMenu::GetLabelForCommandId( Why do ...
4 years, 11 months ago (2016-01-26 02:12:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1612203002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1612203002/40001
4 years, 11 months ago (2016-01-26 21:29:57 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-26 23:10:58 UTC) #18
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/95cfa837a726c4400e025e826fcaddf1bfc751eb Cr-Commit-Position: refs/heads/master@{#371629}
4 years, 11 months ago (2016-01-26 23:12:44 UTC) #20
Finnur
> Hm, you're listed as an OWNER of toolbar_actions_model.h? Ah, yes. I missed that part. ...
4 years, 11 months ago (2016-01-27 17:18:39 UTC) #21
mark a. foltz
4 years, 10 months ago (2016-01-29 00:37:44 UTC) #22
Message was sent while issue was closed.
Forgot to publish drafts after my last PS - sorry!

https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolb...
File chrome/browser/ui/toolbar/media_router_contextual_menu.cc (right):

https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolb...
chrome/browser/ui/toolbar/media_router_contextual_menu.cc:57: base::string16
MediaRouterContextualMenu::GetLabelForCommandId(
On 2016/01/26 at 02:12:35, Peter Kasting wrote:
> Why do you need this function at all?  It seems like all these items are
non-dynamic and thus SimpleMenuModel should never call this function.  Am I
mistaken?

Nope, this is a static menu so it looks like it's never called.  
Good catch - removed.

https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolb...
chrome/browser/ui/toolbar/media_router_contextual_menu.cc:136:
component_migration_helper->OnActionRemoved(
On 2016/01/26 at 02:12:35, Peter Kasting wrote:
> Nit: I'd probably just inline:
> 
>   ToolbarActionsModel::Get(browser_->profile())->component_migration_helper()
>       ->OnActionRemoved(ComponentToolbarActionsFactory::kMediaRouterActionId);
> 
> This seems more readable to me.

Done

https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolb...
File chrome/browser/ui/toolbar/toolbar_actions_model.h (right):

https://codereview.chromium.org/1612203002/diff/20001/chrome/browser/ui/toolb...
chrome/browser/ui/toolbar/toolbar_actions_model.h:183:
extensions::ComponentMigrationHelper* component_migration_helper() {
On 2016/01/26 at 02:12:35, Peter Kasting wrote:
> Nit: Seems like there's a section above for cheap accessors, I'd imagine this
should be with them.
> 
> I doubt the function comment is needed then, since what it says is already
reasonably obvious.

Both done.

Powered by Google App Engine
This is Rietveld 408576698