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

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: 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..d5bd05b245e184b815b6540de678403182b3f0c2 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1038,14 +1038,14 @@ 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, "user");
}
break;
}

Powered by Google App Engine
This is Rietveld 408576698