| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; | 53 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; |
| 54 virtual void keyMessage(const unsigned char* message, size_t messageLength,
const KURL& destinationURL) = 0; | 54 virtual void keyMessage(const unsigned char* message, size_t messageLength,
const KURL& destinationURL) = 0; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 class PLATFORM_EXPORT ContentDecryptionModuleSession : private blink::WebContent
DecryptionModuleSession::Client { | 57 class PLATFORM_EXPORT ContentDecryptionModuleSession : private blink::WebContent
DecryptionModuleSession::Client { |
| 58 WTF_MAKE_NONCOPYABLE(ContentDecryptionModuleSession); | 58 WTF_MAKE_NONCOPYABLE(ContentDecryptionModuleSession); |
| 59 public: | 59 public: |
| 60 static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionMo
duleSessionClient*); | 60 static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionMo
duleSessionClient*); |
| 61 | 61 |
| 62 ContentDecryptionModuleSession(blink::WebContentDecryptionModule*, ContentDe
cryptionModuleSessionClient*); | 62 ContentDecryptionModuleSession(blink::WebContentDecryptionModule*, ContentDe
cryptionModuleSessionClient*); |
| 63 ~ContentDecryptionModuleSession(); | 63 virtual ~ContentDecryptionModuleSession(); |
| 64 | 64 |
| 65 String sessionId() const; | 65 String sessionId() const; |
| 66 void initializeNewSession(const String& mimeType, const Uint8Array& initData
); | 66 void initializeNewSession(const String& mimeType, const Uint8Array& initData
); |
| 67 void update(const Uint8Array& response); | 67 void update(const Uint8Array& response); |
| 68 void release(); | 68 void release(); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 // blink::WebContentDecryptionModuleSession::Client | 71 // blink::WebContentDecryptionModuleSession::Client |
| 72 virtual void keyAdded() OVERRIDE; | 72 virtual void keyAdded() OVERRIDE; |
| 73 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; | 73 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; |
| 74 virtual void keyMessage(const unsigned char* message, size_t messageLength,
const blink::WebURL& destinationURL) OVERRIDE; | 74 virtual void keyMessage(const unsigned char* message, size_t messageLength,
const blink::WebURL& destinationURL) OVERRIDE; |
| 75 | 75 |
| 76 OwnPtr<blink::WebContentDecryptionModuleSession> m_session; | 76 OwnPtr<blink::WebContentDecryptionModuleSession> m_session; |
| 77 | 77 |
| 78 ContentDecryptionModuleSessionClient* m_client; | 78 ContentDecryptionModuleSessionClient* m_client; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace WebCore | 81 } // namespace WebCore |
| 82 | 82 |
| 83 #endif // ContentDecryptionModuleSession_h | 83 #endif // ContentDecryptionModuleSession_h |
| OLD | NEW |