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

Side by Side Diff: media/blink/webmediaplayer_delegate.h

Issue 2681863005: [Video] MediaSession API event handlers can resume background video. (Closed)
Patch Set: Updated the comment in ComputePlayState Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_unittest.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_unittest.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698