OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 WebMediaPlayerEncryptedMediaClient_h | 31 #ifndef WebMediaPlayerEncryptedMediaClient_h |
32 #define WebMediaPlayerEncryptedMediaClient_h | 32 #define WebMediaPlayerEncryptedMediaClient_h |
33 | 33 |
| 34 #include "WebCommon.h" |
| 35 #include "WebEncryptedMediaTypes.h" |
| 36 |
34 namespace blink { | 37 namespace blink { |
35 | 38 |
36 class WebMediaPlayerEncryptedMediaClient { | 39 class WebString; |
| 40 class WebURL; |
| 41 |
| 42 class BLINK_PLATFORM_EXPORT WebMediaPlayerEncryptedMediaClient { |
37 public: | 43 public: |
38 enum MediaKeyErrorCode { | 44 enum MediaKeyErrorCode { |
39 MediaKeyErrorCodeUnknown = 1, | 45 MediaKeyErrorCodeUnknown = 1, |
40 MediaKeyErrorCodeClient, | 46 MediaKeyErrorCodeClient, |
41 MediaKeyErrorCodeService, | 47 MediaKeyErrorCodeService, |
42 MediaKeyErrorCodeOutput, | 48 MediaKeyErrorCodeOutput, |
43 MediaKeyErrorCodeHardwareChange, | 49 MediaKeyErrorCodeHardwareChange, |
44 MediaKeyErrorCodeDomain | 50 MediaKeyErrorCodeDomain |
45 }; | 51 }; |
46 | 52 |
47 virtual void keyAdded(const WebString& keySystem, const WebString& sessionId
) = 0; | 53 virtual void keyAdded(const WebString& keySystem, const WebString& sessionId
) = 0; |
48 virtual void keyError(const WebString& keySystem, const WebString& sessionId
, MediaKeyErrorCode, unsigned short systemCode) = 0; | 54 virtual void keyError(const WebString& keySystem, const WebString& sessionId
, MediaKeyErrorCode, unsigned short systemCode) = 0; |
49 virtual void keyMessage(const WebString& keySystem, const WebString& session
Id, const unsigned char* message, unsigned messageLength, const WebURL& defaultU
RL) = 0; | 55 virtual void keyMessage(const WebString& keySystem, const WebString& session
Id, const unsigned char* message, unsigned messageLength, const WebURL& defaultU
RL) = 0; |
50 virtual void encrypted(WebEncryptedMediaInitDataType, const unsigned char* i
nitData, unsigned initDataLength) = 0; | 56 virtual void encrypted(WebEncryptedMediaInitDataType, const unsigned char* i
nitData, unsigned initDataLength) = 0; |
51 virtual void didBlockPlaybackWaitingForKey() = 0; | 57 virtual void didBlockPlaybackWaitingForKey() = 0; |
52 virtual void didResumePlaybackBlockedForKey() = 0; | 58 virtual void didResumePlaybackBlockedForKey() = 0; |
53 | 59 |
54 protected: | 60 protected: |
55 ~WebMediaPlayerEncryptedMediaClient() { } | 61 ~WebMediaPlayerEncryptedMediaClient() { } |
56 }; | 62 }; |
57 | 63 |
58 } // namespace blink | 64 } // namespace blink |
59 | 65 |
60 #endif | 66 #endif |
OLD | NEW |