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" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // constrained by hardware and memory limits. | 159 // constrained by hardware and memory limits. |
160 virtual void OnMediaResourcesRequested(int player_id); | 160 virtual void OnMediaResourcesRequested(int player_id); |
161 | 161 |
162 // Called when a player releases all decoding resources. | 162 // Called when a player releases all decoding resources. |
163 void ReleaseMediaResources(int player_id); | 163 void ReleaseMediaResources(int player_id); |
164 | 164 |
165 // Releases the player. However, don't remove it from |players_|. | 165 // Releases the player. However, don't remove it from |players_|. |
166 void ReleasePlayer(media::MediaPlayerAndroid* player); | 166 void ReleasePlayer(media::MediaPlayerAndroid* player); |
167 | 167 |
168 #if defined(VIDEO_HOLE) | 168 #if defined(VIDEO_HOLE) |
| 169 void ReleasePlayerOfExternalVideoSurfaceIfNeeded(int future_player); |
169 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); | 170 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); |
170 #endif // defined(VIDEO_HOLE) | 171 #endif // defined(VIDEO_HOLE) |
171 | 172 |
172 RenderFrameHost* const render_frame_host_; | 173 RenderFrameHost* const render_frame_host_; |
173 | 174 |
174 // An array of managed players. | 175 // An array of managed players. |
175 ScopedVector<media::MediaPlayerAndroid> players_; | 176 ScopedVector<media::MediaPlayerAndroid> players_; |
176 | 177 |
177 // The fullscreen video view object or NULL if video is not played in | 178 // The fullscreen video view object or NULL if video is not played in |
178 // fullscreen. | 179 // fullscreen. |
(...skipping 16 matching lines...) Expand all Loading... |
195 | 196 |
196 // NOTE: Weak pointers must be invalidated before all other member variables. | 197 // NOTE: Weak pointers must be invalidated before all other member variables. |
197 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 198 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
198 | 199 |
199 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 200 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
200 }; | 201 }; |
201 | 202 |
202 } // namespace content | 203 } // namespace content |
203 | 204 |
204 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 205 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |