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

Side by Side Diff: public/platform/WebMediaPlayer.h

Issue 423633002: Make HTMLMediaElement.setMediaKeys() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move initial_cdm to constructor Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebMediaPlayer_h 31 #ifndef WebMediaPlayer_h
32 #define WebMediaPlayer_h 32 #define WebMediaPlayer_h
33 33
34 #include "WebCanvas.h" 34 #include "WebCanvas.h"
35 #include "WebContentDecryptionModule.h"
35 #include "WebMediaSource.h" 36 #include "WebMediaSource.h"
36 #include "WebString.h" 37 #include "WebString.h"
37 #include "WebTimeRange.h" 38 #include "WebTimeRange.h"
38 #include "third_party/skia/include/core/SkXfermode.h" 39 #include "third_party/skia/include/core/SkXfermode.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class WebAudioSourceProvider; 43 class WebAudioSourceProvider;
43 class WebAudioSourceProviderClient; 44 class WebAudioSourceProviderClient;
44 class WebContentDecryptionModule; 45 class WebContentDecryptionModule;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Do a GPU-GPU textures copy if possible. 148 // Do a GPU-GPU textures copy if possible.
148 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, unsigned type, bool premult iplyAlpha, bool flipY) { return false; } 149 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, unsigned type, bool premult iplyAlpha, bool flipY) { return false; }
149 150
150 virtual WebAudioSourceProvider* audioSourceProvider() { return 0; } 151 virtual WebAudioSourceProvider* audioSourceProvider() { return 0; }
151 152
152 // Returns whether keySystem is supported. If true, the result will be 153 // Returns whether keySystem is supported. If true, the result will be
153 // reported by an event. 154 // reported by an event.
154 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; } 155 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; }
155 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; } 156 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; }
156 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; } 157 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; }
157 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm) { } 158 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry ptionModuleExceptionNotSupportedError, 0, "ERROR"); }
158 159
159 // Sets the poster image URL. 160 // Sets the poster image URL.
160 virtual void setPoster(const WebURL& poster) { } 161 virtual void setPoster(const WebURL& poster) { }
161 162
162 // Instruct WebMediaPlayer to enter/exit fullscreen. 163 // Instruct WebMediaPlayer to enter/exit fullscreen.
163 virtual void enterFullscreen() { } 164 virtual void enterFullscreen() { }
164 // Returns true if the player can enter fullscreen. 165 // Returns true if the player can enter fullscreen.
165 virtual bool canEnterFullscreen() const { return false; } 166 virtual bool canEnterFullscreen() const { return false; }
166 167
167 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } 168 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { }
168 // |selectedTrackId| is null if no track is selected. 169 // |selectedTrackId| is null if no track is selected.
169 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } 170 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { }
170 }; 171 };
171 172
172 } // namespace blink 173 } // namespace blink
173 174
174 #endif 175 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698