OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ |
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 class WebMediaPlayer; | 9 class WebMediaPlayer; |
10 } | 10 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // where 1 indicates normal (non-ducked) playback. | 55 // where 1 indicates normal (non-ducked) playback. |
56 virtual void OnVolumeMultiplierUpdate(double multiplier) = 0; | 56 virtual void OnVolumeMultiplierUpdate(double multiplier) = 0; |
57 }; | 57 }; |
58 | 58 |
59 // Returns true if the host frame is hidden or closed. | 59 // Returns true if the host frame is hidden or closed. |
60 virtual bool IsFrameHidden() = 0; | 60 virtual bool IsFrameHidden() = 0; |
61 | 61 |
62 // Returns true if the host frame is closed. | 62 // Returns true if the host frame is closed. |
63 virtual bool IsFrameClosed() = 0; | 63 virtual bool IsFrameClosed() = 0; |
64 | 64 |
65 // Returns |true| if background video playback permission has been granted, | |
66 // for example by a media session 'play' command. | |
67 virtual bool IsBackgroundVideoPlaybackUnlocked() = 0; | |
68 | |
69 // Subscribe to observer callbacks. A player must use the returned |player_id| | 65 // Subscribe to observer callbacks. A player must use the returned |player_id| |
70 // for the rest of the calls below. | 66 // for the rest of the calls below. |
71 virtual int AddObserver(Observer* observer) = 0; | 67 virtual int AddObserver(Observer* observer) = 0; |
72 | 68 |
73 // Unsubscribe from observer callbacks. | 69 // Unsubscribe from observer callbacks. |
74 virtual void RemoveObserver(int player_id) = 0; | 70 virtual void RemoveObserver(int player_id) = 0; |
75 | 71 |
76 // Notify playback started. This will request appropriate wake locks and, if | 72 // Notify playback started. This will request appropriate wake locks and, if |
77 // applicable, show a pause button in external controls. | 73 // applicable, show a pause button in external controls. |
78 // | 74 // |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual bool IsStale(int player_id) = 0; | 113 virtual bool IsStale(int player_id) = 0; |
118 | 114 |
119 protected: | 115 protected: |
120 WebMediaPlayerDelegate() = default; | 116 WebMediaPlayerDelegate() = default; |
121 virtual ~WebMediaPlayerDelegate() = default; | 117 virtual ~WebMediaPlayerDelegate() = default; |
122 }; | 118 }; |
123 | 119 |
124 } // namespace media | 120 } // namespace media |
125 | 121 |
126 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ | 122 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_DELEGATE_H_ |
OLD | NEW |