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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 1412083002: Indicate in the Window menu which Chrome window has an active sound playing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: To show which Chromium window has an active/muted sound playing Created 5 years, 2 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/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 9fe0804d70d90ee72dc004027bf3f31a1ff86b0e..a5c8135a59f805db399d51e7ebe120cf9db1ad12 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -251,6 +251,8 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
- (void)setNewTabButtonHoverState:(BOOL)showHover;
- (void)themeDidChangeNotification:(NSNotification*)notification;
- (void)setNewTabImages;
+- (void)updateWindowMediaState:(TabMediaState)media_state
+ on:(content::WebContents*)changed;
Robert Sesek 2015/10/20 13:39:48 nit: align colons
@end
// A simple view class that contains the traffic light buttons. This class
@@ -1626,7 +1628,10 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
}
}
- [tabController setMediaState:chrome::GetTabMediaStateForContents(contents)];
+ TabMediaState media_state = chrome::GetTabMediaStateForContents(contents);
Robert Sesek 2015/10/20 13:39:48 naming: mediaState
+
+ [self updateWindowMediaState:media_state on:contents];
+ [tabController setMediaState:media_state];
[tabController updateVisibility];
}
@@ -2334,4 +2339,12 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
}
}
+- (void)updateWindowMediaState:(TabMediaState)media_state
+ on:(content::WebContents*)selected {
+ NSWindow* window = [tabStripView_ window];
+ BrowserWindowController* windowController =
+ [BrowserWindowController browserWindowControllerForWindow:window];
+ [windowController setMediaState:media_state on:selected];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698