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 e60246817f7730774bf6bea536a45fbe406d2376..ba1db3c6bf6a119eb0fd1e4e479e38b5ad230896 100644 |
--- a/content/browser/media/android/media_web_contents_observer_android.h |
+++ b/content/browser/media/android/media_web_contents_observer_android.h |
@@ -7,6 +7,8 @@ |
#include <stdint.h> |
+#include <list> |
+ |
#include "base/containers/scoped_ptr_hash_map.h" |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
@@ -58,6 +60,10 @@ class CONTENT_EXPORT MediaWebContentsObserverAndroid |
bool OnMessageReceived(const IPC::Message& message, |
RenderFrameHost* render_frame_host) override; |
+ protected: |
+ void WaitForAudioFocusAsyncInternal(int render_frame_id, |
mlamouri (slow - plz ping)
2016/02/03 15:20:52
Add comment saying that `callback` may never be ca
|
+ const base::Closure& focus_cb) override; |
mlamouri (slow - plz ping)
2016/02/03 15:20:52
nit: `callback`
|
+ |
private: |
// Handles messages from the WebMediaPlayerDelegate; does not modify the |
// handled state since the superclass needs to handle these as well. |
@@ -104,6 +110,11 @@ class CONTENT_EXPORT MediaWebContentsObserverAndroid |
std::map<MediaPlayerId, scoped_ptr<MediaSessionController>>; |
MediaSessionMap media_session_map_; |
mlamouri (slow - plz ping)
2016/02/03 15:20:52
I was confused by your change because `media_sessi
|
+ // List of focus callbacks awaiting fulfillment; each entry is a render frame |
+ // id and callback. There may be multiple entries per render frame id. |
+ using FocusWaiter = std::pair<int, base::Closure>; |
mlamouri (slow - plz ping)
2016/02/03 15:20:52
nit: `using FocusCallback`? or `FocusCallbackWrapp
|
+ std::list<FocusWaiter> focus_waiters_; |
mlamouri (slow - plz ping)
2016/02/03 15:20:52
nit: focus_callbacks_
|
+ |
DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); |
}; |