| 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 <set> | 9 #include <set> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 13 #include "base/callback.h" | 14 #include "base/callback.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
| 16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 17 #include "content/browser/android/content_video_view.h" | 18 #include "content/browser/android/content_video_view.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 int player_id, bool is_request, const gfx::RectF& rect); | 212 int player_id, bool is_request, const gfx::RectF& rect); |
| 212 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); | 213 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); |
| 213 #endif // defined(VIDEO_HOLE) | 214 #endif // defined(VIDEO_HOLE) |
| 214 | 215 |
| 215 // An array of managed players. | 216 // An array of managed players. |
| 216 ScopedVector<media::MediaPlayerAndroid> players_; | 217 ScopedVector<media::MediaPlayerAndroid> players_; |
| 217 | 218 |
| 218 // An array of managed media DRM bridges. | 219 // An array of managed media DRM bridges. |
| 219 ScopedVector<media::MediaDrmBridge> drm_bridges_; | 220 ScopedVector<media::MediaDrmBridge> drm_bridges_; |
| 220 | 221 |
| 222 // Map from DrmBridge cdm_id to MediaPlayerAndroid player_id to indicate that |
| 223 // the DrmBridge is set on the MediaPlayerAndroid object. |
| 224 typedef std::map<int, int> DrmBridgePlayerMap; |
| 225 DrmBridgePlayerMap drm_bridge_player_map_; |
| 226 |
| 221 // The fullscreen video view object or NULL if video is not played in | 227 // The fullscreen video view object or NULL if video is not played in |
| 222 // fullscreen. | 228 // fullscreen. |
| 223 scoped_ptr<ContentVideoView> video_view_; | 229 scoped_ptr<ContentVideoView> video_view_; |
| 224 | 230 |
| 225 #if defined(VIDEO_HOLE) | 231 #if defined(VIDEO_HOLE) |
| 226 scoped_ptr<ExternalVideoSurfaceContainer> external_video_surface_container_; | 232 scoped_ptr<ExternalVideoSurfaceContainer> external_video_surface_container_; |
| 227 #endif | 233 #endif |
| 228 | 234 |
| 229 // Player ID of the fullscreen media player. | 235 // Player ID of the fullscreen media player. |
| 230 int fullscreen_player_id_; | 236 int fullscreen_player_id_; |
| 231 | 237 |
| 232 // Whether the fullscreen player has been Release()-d. | 238 // Whether the fullscreen player has been Release()-d. |
| 233 bool fullscreen_player_is_released_; | 239 bool fullscreen_player_is_released_; |
| 234 | 240 |
| 235 WebContents* web_contents_; | 241 WebContents* web_contents_; |
| 236 | 242 |
| 237 // Object for retrieving resources media players. | 243 // Object for retrieving resources media players. |
| 238 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 244 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 239 | 245 |
| 240 // NOTE: Weak pointers must be invalidated before all other member variables. | 246 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 241 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 247 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 242 | 248 |
| 243 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 249 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 244 }; | 250 }; |
| 245 | 251 |
| 246 } // namespace content | 252 } // namespace content |
| 247 | 253 |
| 248 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 254 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |