Chromium Code Reviews| 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> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 // Similar to the above call, MediaPlayerAndroid must call this method when | 213 // Similar to the above call, MediaPlayerAndroid must call this method when |
| 214 // releasing all the decoding resources. | 214 // releasing all the decoding resources. |
| 215 virtual void OnMediaResourcesReleased(int player_id); | 215 virtual void OnMediaResourcesReleased(int player_id); |
| 216 | 216 |
| 217 // An array of managed players. | 217 // An array of managed players. |
| 218 ScopedVector<media::MediaPlayerAndroid> players_; | 218 ScopedVector<media::MediaPlayerAndroid> players_; |
| 219 | 219 |
| 220 // An array of managed media DRM bridges. | 220 // An array of managed media DRM bridges. |
| 221 ScopedVector<media::MediaDrmBridge> drm_bridges_; | 221 ScopedVector<media::MediaDrmBridge> drm_bridges_; |
| 222 | 222 |
| 223 // a set of media keys IDs that are pending approval or approved to access | 223 // A set of media keys IDs that are pending approval or approved to access |
| 224 // device DRM credentials. | 224 // device DRM credentials. |
| 225 // These 2 sets does not cover all the EME videos. If a video only streams | 225 // 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. | 226 // clear data, it will not be included in either set. |
| 227 std::set<int> cdm_ids_pending_approval_; | 227 std::set<int> cdm_ids_pending_approval_; |
| 228 std::set<int> cdm_ids_approved_; | 228 std::set<int> cdm_ids_approved_; |
| 229 | 229 |
| 230 // A map of cdm_id -> player_id. When the player associated by |player_id| is | |
| 231 // available, player->SetDrmBridge(cdm_id) should be called. | |
| 232 std::map<int, int> pending_set_media_keys_map_; | |
|
xhwang
2014/03/10 23:36:32
This is used when we call SetMediaKeys() before we
ddorwin
2014/03/11 04:06:33
How do we have a player_id before video.load()? Is
xhwang
2014/03/12 01:07:52
Removed. You are right: https://code.google.com/p/
ddorwin
2014/03/18 22:51:08
Is there a place that we can DCHECK this?
| |
| 233 | |
| 230 // The fullscreen video view object or NULL if video is not played in | 234 // The fullscreen video view object or NULL if video is not played in |
| 231 // fullscreen. | 235 // fullscreen. |
| 232 scoped_ptr<ContentVideoView> video_view_; | 236 scoped_ptr<ContentVideoView> video_view_; |
| 233 | 237 |
| 234 // Player ID of the fullscreen media player. | 238 // Player ID of the fullscreen media player. |
| 235 int fullscreen_player_id_; | 239 int fullscreen_player_id_; |
| 236 | 240 |
| 237 // The player ID pending to enter fullscreen. | 241 // The player ID pending to enter fullscreen. |
| 238 int pending_fullscreen_player_id_; | 242 int pending_fullscreen_player_id_; |
| 239 | 243 |
| 240 // Whether the fullscreen player has been Release()-d. | 244 // Whether the fullscreen player has been Release()-d. |
| 241 bool fullscreen_player_is_released_; | 245 bool fullscreen_player_is_released_; |
| 242 | 246 |
| 243 WebContents* web_contents_; | 247 WebContents* web_contents_; |
| 244 | 248 |
| 245 // Object for retrieving resources media players. | 249 // Object for retrieving resources media players. |
| 246 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 250 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 247 | 251 |
| 248 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 252 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 249 | 253 |
| 250 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 254 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 251 }; | 255 }; |
| 252 | 256 |
| 253 } // namespace content | 257 } // namespace content |
| 254 | 258 |
| 255 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 259 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |