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 24 matching lines...) Expand all Loading... |
35 virtual blink::WebString sessionId() const; | 35 virtual blink::WebString sessionId() const; |
36 virtual void initializeNewSession(const blink::WebString& mime_type, | 36 virtual void initializeNewSession(const blink::WebString& mime_type, |
37 const uint8* init_data, | 37 const uint8* init_data, |
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 GURL& destination_url); |
46 void OnSessionReady(); | 46 void OnSessionReady(); |
47 void OnSessionClosed(); | 47 void OnSessionClosed(); |
48 void OnSessionError(media::MediaKeys::KeyError error_code, | 48 void OnSessionError(media::MediaKeys::KeyError error_code, |
49 uint32 system_code); | 49 uint32 system_code); |
50 | 50 |
51 private: | 51 private: |
52 scoped_refptr<CdmSessionAdapter> adapter_; | 52 scoped_refptr<CdmSessionAdapter> adapter_; |
53 | 53 |
54 // Non-owned pointer. | 54 // Non-owned pointer. |
55 Client* client_; | 55 Client* client_; |
56 | 56 |
57 // 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. |
58 // This value is not set until the CDM calls OnSessionCreated(). | 58 // This value is not set until the CDM calls OnSessionCreated(). |
59 blink::WebString web_session_id_; | 59 blink::WebString web_session_id_; |
60 | 60 |
61 // 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 |
62 // can get routed to the correct object. | 62 // can get routed to the correct object. |
63 const uint32 session_id_; | 63 const uint32 session_id_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); | 65 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace content | 68 } // namespace content |
69 | 69 |
70 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 70 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
OLD | NEW |