OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "media/base/android/demuxer_stream_player_params.h" | 13 #include "media/base/android/demuxer_stream_player_params.h" |
14 #include "media/base/media_export.h" | 14 #include "media/base/media_export.h" |
15 #include "media/base/media_keys.h" | 15 #include "media/base/media_keys.h" |
| 16 #include "url/gurl.h" |
| 17 |
| 18 class GURL; |
16 | 19 |
17 namespace media { | 20 namespace media { |
18 | 21 |
19 class MediaKeys; | 22 class MediaKeys; |
20 class MediaPlayerAndroid; | 23 class MediaPlayerAndroid; |
21 class MediaResourceGetter; | 24 class MediaResourceGetter; |
22 | 25 |
23 // This class is responsible for managing active MediaPlayerAndroid objects. | 26 // This class is responsible for managing active MediaPlayerAndroid objects. |
24 class MEDIA_EXPORT MediaPlayerManager { | 27 class MEDIA_EXPORT MediaPlayerManager { |
25 public: | 28 public: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 87 |
85 // Called when CDM creates a session. | 88 // Called when CDM creates a session. |
86 virtual void OnSessionCreated(int cdm_id, | 89 virtual void OnSessionCreated(int cdm_id, |
87 uint32 session_id, | 90 uint32 session_id, |
88 const std::string& web_session_id) = 0; | 91 const std::string& web_session_id) = 0; |
89 | 92 |
90 // Called when CDM wants to send a Message event. | 93 // Called when CDM wants to send a Message event. |
91 virtual void OnSessionMessage(int cdm_id, | 94 virtual void OnSessionMessage(int cdm_id, |
92 uint32 session_id, | 95 uint32 session_id, |
93 const std::vector<uint8>& message, | 96 const std::vector<uint8>& message, |
94 const std::string& destination_url) = 0; | 97 const GURL& destination_url) = 0; |
95 | 98 |
96 // Called when CDM wants to send a Ready event. | 99 // Called when CDM wants to send a Ready event. |
97 virtual void OnSessionReady(int cdm_id, uint32 session_id) = 0; | 100 virtual void OnSessionReady(int cdm_id, uint32 session_id) = 0; |
98 | 101 |
99 // Called when CDM wants to send a Closed event. | 102 // Called when CDM wants to send a Closed event. |
100 virtual void OnSessionClosed(int cdm_id, uint32 session_id) = 0; | 103 virtual void OnSessionClosed(int cdm_id, uint32 session_id) = 0; |
101 | 104 |
102 // Called when CDM wants to send an Error event. | 105 // Called when CDM wants to send an Error event. |
103 virtual void OnSessionError(int cdm_id, | 106 virtual void OnSessionError(int cdm_id, |
104 uint32 session_id, | 107 uint32 session_id, |
105 media::MediaKeys::KeyError error_code, | 108 media::MediaKeys::KeyError error_code, |
106 uint32 system_code) = 0; | 109 uint32 system_code) = 0; |
107 }; | 110 }; |
108 | 111 |
109 } // namespace media | 112 } // namespace media |
110 | 113 |
111 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 114 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |