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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 757033005: Make tab audible and muted states and cause available for an extension API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding owners (sky for chrome/browser/ui/tabs/tab_strip_model.cc, jam for changes in content/public… Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 5fa230a0174e3ee1b4c84045ade31f89bf38709b..4caf68e637d7954d124ab35a594a584ab34ee05f 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1038,14 +1038,16 @@ void TabStripModel::ExecuteContextMenuCommand(
case CommandToggleTabAudioMuted: {
const std::vector<int>& indices = GetIndicesForCommand(context_index);
- const bool mute = !chrome::AreAllTabsMuted(*this, indices);
- if (mute)
+ const bool muted = !chrome::AreAllTabsMuted(*this, indices);
+ if (muted)
content::RecordAction(UserMetricsAction("TabContextMenu_MuteTabs"));
else
content::RecordAction(UserMetricsAction("TabContextMenu_UnmuteTabs"));
for (std::vector<int>::const_iterator i = indices.begin();
i != indices.end(); ++i) {
- chrome::SetTabAudioMuted(GetWebContentsAt(*i), mute);
+ chrome::SetTabAudioMuted(GetWebContentsAt(*i),
+ muted,
+ chrome::kUserMuteToggleCause);
}
break;
}

Powered by Google App Engine
This is Rietveld 408576698