| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession { | 41 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession { |
| 42 public: | 42 public: |
| 43 class BLINK_PLATFORM_EXPORT Client { | 43 class BLINK_PLATFORM_EXPORT Client { |
| 44 public: | 44 public: |
| 45 enum MediaKeyErrorCode { | 45 enum MediaKeyErrorCode { |
| 46 MediaKeyErrorCodeUnknown = 1, | 46 MediaKeyErrorCodeUnknown = 1, |
| 47 MediaKeyErrorCodeClient, | 47 MediaKeyErrorCodeClient, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 virtual void keyAdded() = 0; | 50 virtual void message(const unsigned char* message, size_t messageLength,
const blink::WebURL& destinationURL) = 0; |
| 51 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; | 51 virtual void ready() = 0; |
| 52 virtual void keyMessage(const unsigned char* message, size_t messageLeng
th, const blink::WebURL& destinationURL) = 0; | 52 virtual void close() = 0; |
| 53 virtual void error(MediaKeyErrorCode, unsigned long systemCode) = 0; |
| 54 |
| 55 // FIXME: Remove when all callers change to using the methods above. |
| 56 virtual void keyMessage(const unsigned char* actualMessage, size_t messa
geLength, const blink::WebURL& destinationURL) { message(actualMessage, messageL
ength, destinationURL); } |
| 57 virtual void keyAdded() { ready(); } |
| 58 virtual void keyError(MediaKeyErrorCode errorCode, unsigned long systemC
ode) { error(errorCode, systemCode); } |
| 53 | 59 |
| 54 protected: | 60 protected: |
| 55 virtual ~Client(); | 61 virtual ~Client(); |
| 56 }; | 62 }; |
| 57 | 63 |
| 58 virtual ~WebContentDecryptionModuleSession(); | 64 virtual ~WebContentDecryptionModuleSession(); |
| 59 | 65 |
| 60 virtual WebString sessionId() const = 0; | 66 virtual WebString sessionId() const = 0; |
| 61 virtual void initializeNewSession(const WebString& mimeType, const unsigned
char* initData, size_t initDataLength) = 0; | 67 virtual void initializeNewSession(const WebString& mimeType, const unsigned
char* initData, size_t initDataLength) = 0; |
| 62 virtual void update(const unsigned char* response, size_t responseLength) =
0; | 68 virtual void update(const unsigned char* response, size_t responseLength) =
0; |
| 63 virtual void release() = 0; | 69 virtual void release() = 0; |
| 64 }; | 70 }; |
| 65 | 71 |
| 66 } // namespace blink | 72 } // namespace blink |
| 67 | 73 |
| 68 #endif // WebContentDecryptionModuleSession_h | 74 #endif // WebContentDecryptionModuleSession_h |
| OLD | NEW |