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 16 matching lines...) Expand all Loading... | |
27 | 27 |
28 WebContentDecryptionModuleSessionImpl( | 28 WebContentDecryptionModuleSessionImpl( |
29 uint32 session_id, | 29 uint32 session_id, |
30 media::MediaKeys* media_keys, | 30 media::MediaKeys* media_keys, |
31 Client* client, | 31 Client* client, |
32 const SessionClosedCB& session_closed_cb); | 32 const SessionClosedCB& session_closed_cb); |
33 virtual ~WebContentDecryptionModuleSessionImpl(); | 33 virtual ~WebContentDecryptionModuleSessionImpl(); |
34 | 34 |
35 // blink::WebContentDecryptionModuleSession implementation. | 35 // blink::WebContentDecryptionModuleSession implementation. |
36 virtual blink::WebString sessionId() const; | 36 virtual blink::WebString sessionId() const; |
37 virtual void initialize(const blink::WebString& mime_type, | |
ddorwin
2014/01/07 01:17:59
I don't think "initialize" is a good long term nam
xhwang
2014/01/07 01:38:25
I like "initialize" because it's generic and can b
ddorwin
2014/01/07 02:41:37
Maybe something like finishCreation but better. If
ddorwin
2014/01/07 02:41:37
The problem with "initialize" is that something sh
| |
38 const uint8* init_data, | |
39 size_t init_data_length); | |
40 virtual void update(const uint8* response, size_t response_length); | |
41 virtual void release(); | |
42 | |
43 // TODO(xhwang): Drop generateKeyRequest() and close() after blink side is | |
44 // updated. | |
37 virtual void generateKeyRequest(const blink::WebString& mime_type, | 45 virtual void generateKeyRequest(const blink::WebString& mime_type, |
38 const uint8* init_data, | 46 const uint8* init_data, |
39 size_t init_data_length); | 47 size_t init_data_length); |
40 virtual void update(const uint8* response, size_t response_length); | |
41 virtual void close(); | 48 virtual void close(); |
42 | 49 |
43 // Callbacks. | 50 // Callbacks. |
44 void OnSessionCreated(const std::string& web_session_id); | 51 void OnSessionCreated(const std::string& web_session_id); |
45 void OnSessionMessage(const std::vector<uint8>& message, | 52 void OnSessionMessage(const std::vector<uint8>& message, |
46 const std::string& destination_url); | 53 const std::string& destination_url); |
47 void OnSessionReady(); | 54 void OnSessionReady(); |
48 void OnSessionClosed(); | 55 void OnSessionClosed(); |
49 void OnSessionError(media::MediaKeys::KeyError error_code, int system_code); | 56 void OnSessionError(media::MediaKeys::KeyError error_code, int system_code); |
50 | 57 |
(...skipping 11 matching lines...) Expand all Loading... | |
62 // Session ID is used to uniquely track this object so that CDM callbacks | 69 // Session ID is used to uniquely track this object so that CDM callbacks |
63 // can get routed to the correct object. | 70 // can get routed to the correct object. |
64 const uint32 session_id_; | 71 const uint32 session_id_; |
65 | 72 |
66 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); | 73 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); |
67 }; | 74 }; |
68 | 75 |
69 } // namespace content | 76 } // namespace content |
70 | 77 |
71 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 78 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
OLD | NEW |