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

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

Issue 2876223003: cocoa: add some tab-manipulation menu items (Closed)
Patch Set: remove top separator Created 3 years, 7 months 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
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98f12a0360f13128708b16566147ceae49a0c4f6..9905fca7cbd05501a15c137b5a2689499591e083 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -985,7 +985,7 @@ void TabStripModel::ExecuteContextMenuCommand(
case CommandToggleTabAudioMuted: {
const std::vector<int>& indices = GetIndicesForCommand(context_index);
- const bool mute = !chrome::AreAllTabsMuted(*this, indices);
+ const bool mute = WillContextMenuMute(context_index);
if (mute)
base::RecordAction(UserMetricsAction("TabContextMenu_MuteTabs"));
else
@@ -1046,6 +1046,11 @@ std::vector<int> TabStripModel::GetIndicesClosedByCommand(
return indices;
}
+bool TabStripModel::WillContextMenuMute(int index) {
+ std::vector<int> indices = GetIndicesForCommand(index);
+ return !chrome::AreAllTabsMuted(*this, indices);
+}
+
bool TabStripModel::WillContextMenuPin(int index) {
std::vector<int> indices = GetIndicesForCommand(index);
// If all tabs are pinned, then we unpin, otherwise we pin.
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698