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

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

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: MutedToggleCause --> muted_toggle_cause 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_utils.h
diff --git a/chrome/browser/ui/tabs/tab_utils.h b/chrome/browser/ui/tabs/tab_utils.h
index 4480a41609f149cbc48f01466975e4358718eaa5..b0cd17294db863a42a669e27c9813283e6899fb6 100644
--- a/chrome/browser/ui/tabs/tab_utils.h
+++ b/chrome/browser/ui/tabs/tab_utils.h
@@ -33,6 +33,10 @@ enum TabMediaState {
namespace chrome {
+// String to indicate that muted state change was caused by user (instead of
+// initial, capture, an extension id).
+const char kMutedToggleCauseUser[] = "user";
+
// Logic to determine which components (i.e., close button, favicon, and media
// indicator) of a tab should be shown, given current state. |capacity|
// specifies how many components can be shown, given available tab width.
@@ -99,7 +103,9 @@ bool CanToggleAudioMute(content::WebContents* contents);
// Indicates/Sets whether all audio output from |contents| is muted.
bool IsTabAudioMuted(content::WebContents* contents);
-void SetTabAudioMuted(content::WebContents* contents, bool mute);
+void SetTabAudioMuted(content::WebContents* contents,
+ bool muted,
+ const std::string& cause);
// Returns true if the tabs at the |indices| in |tab_strip| are all muted.
bool AreAllTabsMuted(const TabStripModel& tab_strip,

Powered by Google App Engine
This is Rietveld 408576698