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