Index: media/blink/webmediaplayer_delegate.h |
diff --git a/media/blink/webmediaplayer_delegate.h b/media/blink/webmediaplayer_delegate.h |
index 6cd96200814026c830bc9172194d8d044a59629d..c0c19750a8da64e6c4ea8a8f9e56778b5ad8dbce 100644 |
--- a/media/blink/webmediaplayer_delegate.h |
+++ b/media/blink/webmediaplayer_delegate.h |
@@ -18,25 +18,31 @@ class WebMediaPlayerDelegate { |
public: |
virtual void OnHidden() = 0; |
virtual void OnShown() = 0; |
+ virtual void OnPlay() = 0; |
+ virtual void OnPause() = 0; |
+ virtual void OnVolumeMultiplierUpdate(double multiplier) = 0; |
}; |
WebMediaPlayerDelegate() {} |
+ // Subscribe or unsubscribe from observer callbacks respectively. A client |
+ // must use the delegate id returned by AddObserver() for all other calls. |
+ virtual int AddObserver(Observer* observer) = 0; |
+ virtual void RemoveObserver(int delegate_id) = 0; |
+ |
// The specified player started playing media. |
- virtual void DidPlay(blink::WebMediaPlayer* player) = 0; |
+ virtual void DidPlay(int delegate_id, |
+ bool has_video, |
+ bool has_audio, |
+ bool is_remote, |
+ base::TimeDelta duration) = 0; |
// The specified player stopped playing media. |
- virtual void DidPause(blink::WebMediaPlayer* player) = 0; |
- |
- // The specified player was destroyed. Do not call any methods on it. |
- // (RemoveObserver() is still necessary if the player is also an observer.) |
- virtual void PlayerGone(blink::WebMediaPlayer* player) = 0; |
- |
- // Subscribe to observer callbacks. |
- virtual void AddObserver(Observer* observer) = 0; |
+ virtual void DidPause(int delegate_id, bool reached_end_of_stream) = 0; |
- // Unsubscribe from observer callbacks. |
- virtual void RemoveObserver(Observer* observer) = 0; |
+ // The specified player was destroyed or suspended. Note: Clients must still |
+ // call RemoveObserver() to unsubscribe from callbacks. |
sandersd (OOO until July 31)
2016/01/25 19:10:59
Nit: Should document that this can be called multi
DaleCurtis
2016/01/25 21:49:47
Done.
|
+ virtual void PlayerGone(int delegate_id) = 0; |
// Returns whether the render frame is currently hidden. |
virtual bool IsHidden() = 0; |