OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 size_t init_data_length); | 38 size_t init_data_length); |
39 virtual void update(const uint8* response, size_t response_length); | 39 virtual void update(const uint8* response, size_t response_length); |
40 virtual void release(); | 40 virtual void release(); |
41 | 41 |
42 // Callbacks. | 42 // Callbacks. |
43 void OnSessionCreated(const std::string& web_session_id); | 43 void OnSessionCreated(const std::string& web_session_id); |
44 void OnSessionMessage(const std::vector<uint8>& message, | 44 void OnSessionMessage(const std::vector<uint8>& message, |
45 const std::string& destination_url); | 45 const std::string& destination_url); |
46 void OnSessionReady(); | 46 void OnSessionReady(); |
47 void OnSessionClosed(); | 47 void OnSessionClosed(); |
48 void OnSessionError(media::MediaKeys::KeyError error_code, int system_code); | 48 void OnSessionError(media::MediaKeys::KeyError error_code, |
| 49 uint32 system_code); |
49 | 50 |
50 private: | 51 private: |
51 scoped_refptr<CdmSessionAdapter> adapter_; | 52 scoped_refptr<CdmSessionAdapter> adapter_; |
52 | 53 |
53 // Non-owned pointer. | 54 // Non-owned pointer. |
54 Client* client_; | 55 Client* client_; |
55 | 56 |
56 // Web session ID is the app visible ID for this session generated by the CDM. | 57 // Web session ID is the app visible ID for this session generated by the CDM. |
57 // This value is not set until the CDM calls OnSessionCreated(). | 58 // This value is not set until the CDM calls OnSessionCreated(). |
58 blink::WebString web_session_id_; | 59 blink::WebString web_session_id_; |
59 | 60 |
60 // Session ID is used to uniquely track this object so that CDM callbacks | 61 // Session ID is used to uniquely track this object so that CDM callbacks |
61 // can get routed to the correct object. | 62 // can get routed to the correct object. |
62 const uint32 session_id_; | 63 const uint32 session_id_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); | 65 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace content | 68 } // namespace content |
68 | 69 |
69 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 70 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
OLD | NEW |