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

Unified Diff: content/browser/media/android/media_web_contents_observer_android.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/android/media_web_contents_observer_android.h
diff --git a/content/browser/media/android/media_web_contents_observer_android.h b/content/browser/media/android/media_web_contents_observer_android.h
index 3627aeedf6ed6ddf96b26dea4cf4df302a0410f0..8dd164a32e9db1f4e49bef97e72378033cdcc0ec 100644
--- a/content/browser/media/android/media_web_contents_observer_android.h
+++ b/content/browser/media/android/media_web_contents_observer_android.h
@@ -48,6 +48,10 @@ class CONTENT_EXPORT MediaWebContentsObserverAndroid
bool OnMessageReceived(const IPC::Message& message,
RenderFrameHost* render_frame_host) override;
+ protected:
+ void CheckFocus(int render_frame_id,
+ const base::Closure& on_focus_cb) override;
+
private:
// Handles messages for the media player delgate; does not modify the handled
// state since the superclass needs to handle these as well.
@@ -92,6 +96,9 @@ class CONTENT_EXPORT MediaWebContentsObserverAndroid
std::map<MediaPlayerId, scoped_ptr<MediaSessionController>>;
MediaSessionMap media_session_map_;
+ // Map of deferred focus callbacks needing fulfillment.
+ std::map<int, std::vector<base::Closure>> deferred_focus_cbs_;
+
DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698