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_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
7 | 7 |
8 #include <map> | |
9 #include <set> | 8 #include <set> |
10 #include <string> | 9 #include <string> |
11 #include <vector> | 10 #include <vector> |
12 | 11 |
13 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
14 #include "base/callback.h" | 13 #include "base/callback.h" |
15 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
17 #include "base/time/time.h" | 16 #include "base/time/time.h" |
18 #include "content/browser/android/content_video_view.h" | 17 #include "content/browser/android/content_video_view.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 const std::string& key_system, | 139 const std::string& key_system, |
141 const GURL& frame_url); | 140 const GURL& frame_url); |
142 void OnCreateSession(int cdm_id, | 141 void OnCreateSession(int cdm_id, |
143 uint32 session_id, | 142 uint32 session_id, |
144 CdmHostMsg_CreateSession_ContentType content_type, | 143 CdmHostMsg_CreateSession_ContentType content_type, |
145 const std::vector<uint8>& init_data); | 144 const std::vector<uint8>& init_data); |
146 void OnUpdateSession(int cdm_id, | 145 void OnUpdateSession(int cdm_id, |
147 uint32 session_id, | 146 uint32 session_id, |
148 const std::vector<uint8>& response); | 147 const std::vector<uint8>& response); |
149 void OnReleaseSession(int cdm_id, uint32 session_id); | 148 void OnReleaseSession(int cdm_id, uint32 session_id); |
150 void OnSetMediaKeys(int player_id, int cdm_id); | 149 void OnSetCdm(int player_id, int cdm_id); |
151 void OnDestroyCdm(int cdm_id); | 150 void OnDestroyCdm(int cdm_id); |
152 | 151 |
153 // Cancels all pending session creations associated with |cdm_id|. | 152 // Cancels all pending session creations associated with |cdm_id|. |
154 void CancelAllPendingSessionCreations(int cdm_id); | 153 void CancelAllPendingSessionCreations(int cdm_id); |
155 | 154 |
156 #if defined(VIDEO_HOLE) | 155 #if defined(VIDEO_HOLE) |
157 virtual void OnNotifyExternalSurface( | 156 virtual void OnNotifyExternalSurface( |
158 int player_id, bool is_request, const gfx::RectF& rect); | 157 int player_id, bool is_request, const gfx::RectF& rect); |
159 #endif // defined(VIDEO_HOLE) | 158 #endif // defined(VIDEO_HOLE) |
160 | 159 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // Similar to the above call, MediaPlayerAndroid must call this method when | 212 // Similar to the above call, MediaPlayerAndroid must call this method when |
214 // releasing all the decoding resources. | 213 // releasing all the decoding resources. |
215 virtual void OnMediaResourcesReleased(int player_id); | 214 virtual void OnMediaResourcesReleased(int player_id); |
216 | 215 |
217 // An array of managed players. | 216 // An array of managed players. |
218 ScopedVector<media::MediaPlayerAndroid> players_; | 217 ScopedVector<media::MediaPlayerAndroid> players_; |
219 | 218 |
220 // An array of managed media DRM bridges. | 219 // An array of managed media DRM bridges. |
221 ScopedVector<media::MediaDrmBridge> drm_bridges_; | 220 ScopedVector<media::MediaDrmBridge> drm_bridges_; |
222 | 221 |
223 // a set of media keys IDs that are pending approval or approved to access | 222 // A set of media keys IDs that are pending approval or approved to access |
224 // device DRM credentials. | 223 // device DRM credentials. |
225 // These 2 sets does not cover all the EME videos. If a video only streams | 224 // These 2 sets does not cover all the EME videos. If a video only streams |
226 // clear data, it will not be included in either set. | 225 // clear data, it will not be included in either set. |
227 std::set<int> cdm_ids_pending_approval_; | 226 std::set<int> cdm_ids_pending_approval_; |
228 std::set<int> cdm_ids_approved_; | 227 std::set<int> cdm_ids_approved_; |
229 | 228 |
230 // The fullscreen video view object or NULL if video is not played in | 229 // The fullscreen video view object or NULL if video is not played in |
231 // fullscreen. | 230 // fullscreen. |
232 scoped_ptr<ContentVideoView> video_view_; | 231 scoped_ptr<ContentVideoView> video_view_; |
233 | 232 |
(...skipping 13 matching lines...) Expand all Loading... |
247 | 246 |
248 // NOTE: Weak pointers must be invalidated before all other member variables. | 247 // NOTE: Weak pointers must be invalidated before all other member variables. |
249 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 248 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
250 | 249 |
251 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 250 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
252 }; | 251 }; |
253 | 252 |
254 } // namespace content | 253 } // namespace content |
255 | 254 |
256 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 255 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |