[Cocoa] Tab audio mute control, behind a switch (off by default).
This change renames MediaIndicatorView to MediaIndicatorButton, and then
merges-in the new functionality to support tab muting by clicking on the
indicator. This is the "Cocoa port" of a previous change that added
this feature to the views UI: http://codereview.chromium.org/591963002
See change description in link above for details.
Also, this change resolves a long-standing bug where navigating back
into a NTP would leave the audio indicator turned on even though the NTP
does not emit sound.
BUG=360372, 344229
TEST=With --enable-tab-audio-muting, user can click audio indicator to toggle tab muting, or use the tab context menu to toggle muting of one or more selected tabs.
Review URL: https://codereview.chromium.org/688523002
Cr-Commit-Position: refs/heads/master@{#302378}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e0b7c087..859eea8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1980,15 +1980,13 @@
SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets)
},
#endif // OS_CHROMEOS
-#if defined(USE_AURA)
{
"enable-tab-audio-muting",
IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME,
IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION,
- kOsWin | kOsLinux | kOsCrOS,
+ kOsDesktop,
SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting)
},
-#endif // defined(USE_AURA)
{
"enable-credential-manager-api",
IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME,