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_ANDROID_PROXY_MEDIA_KEYS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "media/base/media_keys.h" | 9 #include "media/base/media_keys.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 const media::SessionCreatedCB& session_created_cb, | 25 const media::SessionCreatedCB& session_created_cb, |
26 const media::SessionMessageCB& session_message_cb, | 26 const media::SessionMessageCB& session_message_cb, |
27 const media::SessionReadyCB& session_ready_cb, | 27 const media::SessionReadyCB& session_ready_cb, |
28 const media::SessionClosedCB& session_closed_cb, | 28 const media::SessionClosedCB& session_closed_cb, |
29 const media::SessionErrorCB& session_error_cb); | 29 const media::SessionErrorCB& session_error_cb); |
30 virtual ~ProxyMediaKeys(); | 30 virtual ~ProxyMediaKeys(); |
31 | 31 |
32 void InitializeCDM(const std::string& key_system, const GURL& frame_url); | 32 void InitializeCDM(const std::string& key_system, const GURL& frame_url); |
33 | 33 |
34 // MediaKeys implementation. | 34 // MediaKeys implementation. |
35 virtual bool CreateSession(uint32 reference_id, | 35 virtual bool CreateSession(uint32 session_id, |
36 const std::string& type, | 36 const std::string& type, |
37 const uint8* init_data, | 37 const uint8* init_data, |
38 int init_data_length) OVERRIDE; | 38 int init_data_length) OVERRIDE; |
39 virtual void UpdateSession(uint32 reference_id, | 39 virtual void UpdateSession(uint32 session_id, |
40 const uint8* response, | 40 const uint8* response, |
41 int response_length) OVERRIDE; | 41 int response_length) OVERRIDE; |
42 virtual void ReleaseSession(uint32 reference_id) OVERRIDE; | 42 virtual void ReleaseSession(uint32 session_id) OVERRIDE; |
43 | 43 |
44 // Callbacks. | 44 // Callbacks. |
45 void OnSessionCreated(uint32 reference_id, const std::string& session_id); | 45 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
46 void OnSessionMessage(uint32 reference_id, | 46 void OnSessionMessage(uint32 session_id, |
47 const std::vector<uint8>& message, | 47 const std::vector<uint8>& message, |
48 const std::string& destination_url); | 48 const std::string& destination_url); |
49 void OnSessionReady(uint32 reference_id); | 49 void OnSessionReady(uint32 session_id); |
50 void OnSessionClosed(uint32 reference_id); | 50 void OnSessionClosed(uint32 session_id); |
51 void OnSessionError(uint32 reference_id, | 51 void OnSessionError(uint32 session_id, |
52 media::MediaKeys::KeyError error_code, | 52 media::MediaKeys::KeyError error_code, |
53 int system_code); | 53 int system_code); |
54 | 54 |
55 private: | 55 private: |
56 RendererMediaPlayerManager* manager_; | 56 RendererMediaPlayerManager* manager_; |
57 int media_keys_id_; | 57 int media_keys_id_; |
58 media::SessionCreatedCB session_created_cb_; | 58 media::SessionCreatedCB session_created_cb_; |
59 media::SessionMessageCB session_message_cb_; | 59 media::SessionMessageCB session_message_cb_; |
60 media::SessionReadyCB session_ready_cb_; | 60 media::SessionReadyCB session_ready_cb_; |
61 media::SessionClosedCB session_closed_cb_; | 61 media::SessionClosedCB session_closed_cb_; |
62 media::SessionErrorCB session_error_cb_; | 62 media::SessionErrorCB session_error_cb_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(ProxyMediaKeys); | 64 DISALLOW_COPY_AND_ASSIGN(ProxyMediaKeys); |
65 }; | 65 }; |
66 | 66 |
67 } // namespace content | 67 } // namespace content |
68 | 68 |
69 #endif // CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ | 69 #endif // CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ |
OLD | NEW |