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

Unified Diff: content/browser/media/media_web_contents_observer.h

Issue 1580493004: Plumb audio focus support for spitzer clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate_hookup
Patch Set: Fix crash, plumb. Created 4 years, 11 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/media/media_web_contents_observer.h
diff --git a/content/browser/media/media_web_contents_observer.h b/content/browser/media/media_web_contents_observer.h
index 0e3c980a42b1eaae62d17132aaca3a905fc10692..57543bcebbbd823e3c0eb22dcac11fdd67e4645f 100644
--- a/content/browser/media/media_web_contents_observer.h
+++ b/content/browser/media/media_web_contents_observer.h
@@ -11,6 +11,7 @@
#include <set>
#include <vector>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
@@ -47,6 +48,17 @@ class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver {
return video_power_save_blocker_;
}
+ // Executes |on_focus_cb| once the given render frame has audio focus. Will
+ // be run on the calling thread. Clients are responsible for invalidating
+ // |on_focus_cb| if their lifetime changes or the callback is unnecessary.
+ static void HasAudioFocus(int render_process_id,
+ int render_frame_id,
+ const base::Closure& on_focus_cb);
+
+ protected:
+ virtual void CheckFocus(int render_frame_id,
+ const base::Closure& on_focus_cb);
+
private:
void OnMediaDestroyedNotification(RenderFrameHost* render_frame_host,
int64_t player_cookie);

Powered by Google App Engine
This is Rietveld 408576698