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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class WebString; | 40 class WebString; |
41 class WebURL; | 41 class WebURL; |
42 | 42 |
43 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession { | 43 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession { |
44 public: | 44 public: |
45 class BLINK_PLATFORM_EXPORT Client { | 45 class BLINK_PLATFORM_EXPORT Client { |
46 public: | 46 public: |
47 enum MediaKeyErrorCode { | |
48 MediaKeyErrorCodeUnknown = 1, | |
49 MediaKeyErrorCodeClient, | |
50 }; | |
51 | |
52 virtual void message(const unsigned char* message, size_t messageLength,
const WebURL& destinationURL) = 0; | 47 virtual void message(const unsigned char* message, size_t messageLength,
const WebURL& destinationURL) = 0; |
53 virtual void ready() = 0; | |
54 virtual void close() = 0; | 48 virtual void close() = 0; |
55 // FIXME: Remove this method once Chromium updated to use the new parame
ters. | |
56 virtual void error(MediaKeyErrorCode, unsigned long systemCode) = 0; | |
57 virtual void error(WebContentDecryptionModuleException, unsigned long sy
stemCode, const WebString& message) = 0; | |
58 | 49 |
59 // Called when the expiration time for the session changes. | 50 // Called when the expiration time for the session changes. |
60 // |updatedExpiryTimeInMS| is specified as the number of milliseconds | 51 // |updatedExpiryTimeInMS| is specified as the number of milliseconds |
61 // since 01 January, 1970 UTC. | 52 // since 01 January, 1970 UTC. |
62 virtual void expirationChanged(double updatedExpiryTimeInMS) = 0; | 53 virtual void expirationChanged(double updatedExpiryTimeInMS) = 0; |
63 | 54 |
64 protected: | 55 protected: |
65 virtual ~Client(); | 56 virtual ~Client(); |
66 }; | 57 }; |
67 | 58 |
68 virtual ~WebContentDecryptionModuleSession(); | 59 virtual ~WebContentDecryptionModuleSession(); |
69 | 60 |
70 virtual void setClientInterface(Client*) = 0; | 61 virtual void setClientInterface(Client*) = 0; |
71 virtual WebString sessionId() const = 0; | 62 virtual WebString sessionId() const = 0; |
72 | 63 |
73 // FIXME: Remove these methods once the new methods are implemented in Chrom
ium. | 64 virtual void initializeNewSession(const WebString& initDataType, const unsig
ned char* initData, size_t initDataLength, const WebString& sessionType, WebCont
entDecryptionModuleResult) = 0; |
74 virtual void initializeNewSession(const WebString& mimeType, const unsigned
char* initData, size_t initDataLength) = 0; | 65 virtual void load(const WebString& sessionId, WebContentDecryptionModuleResu
lt) = 0; |
75 virtual void update(const unsigned char* response, size_t responseLength) =
0; | 66 virtual void update(const unsigned char* response, size_t responseLength, We
bContentDecryptionModuleResult) = 0; |
76 virtual void release() = 0; | 67 virtual void close(WebContentDecryptionModuleResult) = 0; |
77 | 68 virtual void remove(WebContentDecryptionModuleResult) = 0; |
78 virtual void initializeNewSession(const WebString& initDataType, const unsig
ned char* initData, size_t initDataLength, const WebString& sessionType, WebCont
entDecryptionModuleResult); | |
79 virtual void load(const WebString& sessionId, WebContentDecryptionModuleResu
lt); | |
80 virtual void update(const unsigned char* response, size_t responseLength, We
bContentDecryptionModuleResult); | |
81 virtual void close(WebContentDecryptionModuleResult); | |
82 virtual void remove(WebContentDecryptionModuleResult); | |
83 | |
84 // FIXME: Remove this method once the new methods are implemented in Chromiu
m. | |
85 virtual void release(WebContentDecryptionModuleResult); | |
86 }; | 69 }; |
87 | 70 |
88 } // namespace blink | 71 } // namespace blink |
89 | 72 |
90 #endif // WebContentDecryptionModuleSession_h | 73 #endif // WebContentDecryptionModuleSession_h |
OLD | NEW |