| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "content/browser/android/content_video_view.h" | 13 #include "content/browser/android/content_video_view.h" |
| 14 #include "content/browser/media/android/audio_focus_manager.h" |
| 14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 15 #include "content/common/media/media_player_messages_enums_android.h" | 16 #include "content/common/media/media_player_messages_enums_android.h" |
| 16 #include "content/public/browser/android/content_view_core.h" | 17 #include "content/public/browser/android/content_view_core.h" |
| 17 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
| 18 #include "media/base/android/media_player_android.h" | 19 #include "media/base/android/media_player_android.h" |
| 19 #include "media/base/android/media_player_manager.h" | 20 #include "media/base/android/media_player_manager.h" |
| 20 #include "media/base/android/media_url_interceptor.h" | 21 #include "media/base/android/media_url_interceptor.h" |
| 21 #include "ui/gfx/geometry/rect_f.h" | 22 #include "ui/gfx/geometry/rect_f.h" |
| 22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 23 | 24 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void ReleasePlayer(media::MediaPlayerAndroid* player); | 171 void ReleasePlayer(media::MediaPlayerAndroid* player); |
| 171 | 172 |
| 172 #if defined(VIDEO_HOLE) | 173 #if defined(VIDEO_HOLE) |
| 173 void ReleasePlayerOfExternalVideoSurfaceIfNeeded(int future_player); | 174 void ReleasePlayerOfExternalVideoSurfaceIfNeeded(int future_player); |
| 174 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); | 175 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); |
| 175 #endif // defined(VIDEO_HOLE) | 176 #endif // defined(VIDEO_HOLE) |
| 176 | 177 |
| 177 RenderFrameHost* const render_frame_host_; | 178 RenderFrameHost* const render_frame_host_; |
| 178 | 179 |
| 179 MediaPlayersObserver* audio_monitor_; | 180 MediaPlayersObserver* audio_monitor_; |
| 181 scoped_ptr<AudioFocusManager> audio_focus_manager_; |
| 180 | 182 |
| 181 // An array of managed players. | 183 // An array of managed players. |
| 182 ScopedVector<media::MediaPlayerAndroid> players_; | 184 ScopedVector<media::MediaPlayerAndroid> players_; |
| 183 | 185 |
| 184 // The fullscreen video view object or NULL if video is not played in | 186 // The fullscreen video view object or NULL if video is not played in |
| 185 // fullscreen. | 187 // fullscreen. |
| 186 scoped_ptr<ContentVideoView> video_view_; | 188 scoped_ptr<ContentVideoView> video_view_; |
| 187 | 189 |
| 188 #if defined(VIDEO_HOLE) | 190 #if defined(VIDEO_HOLE) |
| 189 scoped_ptr<ExternalVideoSurfaceContainer> external_video_surface_container_; | 191 scoped_ptr<ExternalVideoSurfaceContainer> external_video_surface_container_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 202 | 204 |
| 203 // NOTE: Weak pointers must be invalidated before all other member variables. | 205 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 204 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 206 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 205 | 207 |
| 206 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 208 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 207 }; | 209 }; |
| 208 | 210 |
| 209 } // namespace content | 211 } // namespace content |
| 210 | 212 |
| 211 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 213 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |