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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.h

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: Applied some changes based on comments 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.h
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index 637edc505c961ce0cdf4016a5cb27b8125130608..9a2a553cad903744a31409c2c9f238b7d5880e53 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/search/search_model_observer.h"
+#include "chrome/browser/ui/tabs/tab_utils.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "ui/base/ui_base_types.h"
@@ -180,6 +181,17 @@ class BrowserWindowCocoa
// Returns the cocoa-world BrowserWindowController
BrowserWindowController* cocoa_controller() { return controller_; }
+ // Update window media state to show if one of the tabs within the window is
+ // playing an audio/video or even if it's playing something but it's muted.
+ void UpdateMediaState(TabMediaState media_state);
Robert Sesek 2015/11/02 22:36:43 nit: order this above the trivial getters (also re
+
+ // Returns current media state, determined by the media state of tabs, set by
+ // UpdateMediaState.
+ TabMediaState mediaState();
Robert Sesek 2015/11/02 22:36:43 naming: media_state(), and you can inline the body
+
+ // Returns window title based on the active tab title and window media state.
+ NSString* windowTitle();
Robert Sesek 2015/11/02 22:36:43 naming: WindowTitle(), and reorder above media_sta
+
protected:
void DestroyBrowser() override;
@@ -191,6 +203,11 @@ class BrowserWindowCocoa
base::scoped_nsobject<NSString> pending_window_title_;
ui::WindowShowState initial_show_state_;
NSInteger attention_request_id_; // identifier from requestUserAttention
+
+ // Preserves window media state to show appropriate icon in the window title
+ // which can be audio playing, muting or none (determined by media state of
+ // tabs.
+ TabMediaState media_state_;
};
#endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698