Commit c447798a authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

Change Mute Tab to Mute Site on the Window menu on Mac

Currently, the Window menu shows "Mute Tab", which used to match the
tab dropdown's "Mute tab". However, the tab dropdown text has been
changed to "Mute site" for site muting, so we want to change the Window
menu text to "Mute Site" to match.

This should in theory be behind the SoundContentSetting feature flag,
but that's not doable in a .xib file.

Bug: 788982
Change-Id: If36c57b9fbc536d1eed95e13d23032c38da22499
Reviewed-on: https://chromium-review.googlesource.com/792299Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Reviewed-by: default avatarJay Civelli <jcivelli@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520163}
parent 67000700
......@@ -89,7 +89,7 @@
#define IDC_TRANSLATE_PAGE 35009
#define IDC_MANAGE_PASSWORDS_FOR_PAGE 35010
#define IDC_ROUTE_MEDIA 35011
#define IDC_WINDOW_MUTE_TAB 35012
#define IDC_WINDOW_MUTE_SITE 35012
#define IDC_WINDOW_PIN_TAB 35013
// Clipboard commands
......
......@@ -8893,8 +8893,8 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_DUPLICATE_TAB_MAC" desc="The Mac menu item for duplicating the selected tab(s).">
Duplicate Tab
</message>
<message name="IDS_MUTE_TAB_MAC" desc="The Mac menu item for muting the selected tab(s).">
Mute Tab
<message name="IDS_MUTE_SITE_MAC" desc="The Mac menu item for muting the selected tab(s).">
Mute Site
</message>
<message name="IDS_PIN_TAB_MAC" desc="The Mac menu item for pinning the selected tab(s).">
Pin Tab
......
......@@ -505,7 +505,7 @@ CA
<action selector="commandDispatch:" target="-1" id="AjB-PF-HrG"/>
</connections>
</menuItem>
<menuItem title="^IDS_MUTE_TAB_MAC" tag="35012" id="WVg-XQ-yLX">
<menuItem title="^IDS_MUTE_SITE_MAC" tag="35012" id="WVg-XQ-yLX">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="commandDispatch:" target="-1" id="LaZ-j6-0bg"/>
......
......@@ -657,8 +657,8 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
case IDC_ROUTE_MEDIA:
RouteMedia(browser_);
break;
case IDC_WINDOW_MUTE_TAB:
MuteTab(browser_);
case IDC_WINDOW_MUTE_SITE:
MuteSite(browser_);
break;
case IDC_WINDOW_PIN_TAB:
PinTab(browser_);
......@@ -887,7 +887,7 @@ void BrowserCommandController::InitCommandState() {
IDC_DISTILL_PAGE, base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableDomDistiller));
command_updater_.UpdateCommandEnabled(IDC_WINDOW_MUTE_TAB, normal_window);
command_updater_.UpdateCommandEnabled(IDC_WINDOW_MUTE_SITE, normal_window);
command_updater_.UpdateCommandEnabled(IDC_WINDOW_PIN_TAB, normal_window);
// Initialize other commands whose state changes based on various conditions.
......@@ -965,7 +965,7 @@ void BrowserCommandController::UpdateCommandsForTabState() {
// Window management commands
command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB,
!browser_->is_app() && CanDuplicateTab(browser_));
command_updater_.UpdateCommandEnabled(IDC_WINDOW_MUTE_TAB,
command_updater_.UpdateCommandEnabled(IDC_WINDOW_MUTE_SITE,
!browser_->is_app());
command_updater_.UpdateCommandEnabled(IDC_WINDOW_PIN_TAB,
!browser_->is_app());
......
......@@ -740,7 +740,7 @@ void PinTab(Browser* browser) {
TabStripModel::ContextMenuCommand::CommandTogglePinned);
}
void MuteTab(Browser* browser) {
void MuteSite(Browser* browser) {
TabStripModel::ContextMenuCommand command_id =
base::FeatureList::IsEnabled(features::kSoundContentSetting)
? TabStripModel::ContextMenuCommand::CommandToggleSiteMuted
......
......@@ -95,7 +95,7 @@ void DuplicateTab(Browser* browser);
bool CanDuplicateTab(const Browser* browser);
content::WebContents* DuplicateTabAt(Browser* browser, int index);
bool CanDuplicateTabAt(const Browser* browser, int index);
void MuteTab(Browser* browser);
void MuteSite(Browser* browser);
void PinTab(Browser* browser);
void ConvertPopupToTabbedBrowser(Browser* browser);
void Exit();
......
......@@ -64,7 +64,7 @@ void UpdateToggleStateWithTag(NSInteger tag, id item, NSWindow* window) {
return;
}
if (tag == IDC_WINDOW_MUTE_TAB) {
if (tag == IDC_WINDOW_MUTE_SITE) {
TabStripModel* model = browser->tab_strip_model();
bool will_mute =
base::FeatureList::IsEnabled(features::kSoundContentSetting)
......
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