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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 1970313002: Audio notification plumbed from guest WebContents up to embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 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
Index: content/browser/browser_plugin/browser_plugin_embedder.cc
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index 274315ecd3b9e022242696df9ea3938812a6e682..f02b5ae9b8beff3fca8c4704e7298f6081224118 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -219,6 +219,17 @@ BrowserPluginGuest* BrowserPluginEmbedder::GetFullPageGuest() {
}
// static
+bool BrowserPluginEmbedder::GuestRecentlyAudibleCallback(WebContents* guest) {
+ return guest->WasRecentlyAudible();
+}
+
+bool BrowserPluginEmbedder::WereAnyGuestsRecentlyAudible() {
+ return GetBrowserPluginGuestManager()->ForEachGuest(
+ web_contents(),
+ base::Bind(&BrowserPluginEmbedder::GuestRecentlyAudibleCallback));
+}
+
+// static
bool BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback(bool* mouse_unlocked,
WebContents* guest) {
*mouse_unlocked |= static_cast<WebContentsImpl*>(guest)
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698