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

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

Issue 591963002: Tab audio mute control (views UI), behind a switch (off by default). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mpearson's comments; added a few CloseTab UMA's. Created 6 years, 3 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
Index: chrome/browser/ui/tabs/tab_strip_model.h
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h
index 25279468d2cb3887ab2263fbfecfc22610cb54c1..8b942d07c6d24c38089d0508bd40be71ad12e78a 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -325,6 +325,12 @@ class TabStripModel {
// See description above class for details on pinned tabs.
bool IsTabPinned(int index) const;
+ // Changes the muted audio state of the tab at |index|.
+ void SetTabAudioMuted(int index, bool mute);
+
+ // Returns true if the tab at |index| is muting its audio.
+ bool IsTabAudioMuted(int index) const;
+
// Is the tab a mini-tab?
// See description above class for details on this.
bool IsMiniTab(int index) const;
@@ -412,6 +418,7 @@ class TabStripModel {
CommandCloseTabsToRight,
CommandRestoreTab,
CommandTogglePinned,
+ CommandToggleTabAudioMuted,
CommandBookmarkAllTabs,
CommandSelectByDomain,
CommandSelectByOpener,
@@ -439,6 +446,10 @@ class TabStripModel {
// supplied to |ExecuteContextMenuCommand|.
bool WillContextMenuPin(int index);
+ // Returns true if 'CommandToggleTabAudioMuted' will mute. |index| is the
+ // index supplied to |ExecuteContextMenuCommand|.
+ bool WillContextMenuMute(int index);
+
// Convert a ContextMenuCommand into a browser command. Returns true if a
// corresponding browser command exists, false otherwise.
static bool ContextMenuCommandToBrowserCommand(int cmd_id, int* browser_cmd);

Powered by Google App Engine
This is Rietveld 408576698