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 "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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 media::MediaPlayerManager* manager, | 151 media::MediaPlayerManager* manager, |
| 152 BrowserDemuxerAndroid* demuxer); | 152 BrowserDemuxerAndroid* demuxer); |
| 153 | 153 |
| 154 // MediaPlayerAndroid must call this before it is going to decode | 154 // MediaPlayerAndroid must call this before it is going to decode |
| 155 // media streams. This helps the manager object maintain an array | 155 // media streams. This helps the manager object maintain an array |
| 156 // of active MediaPlayerAndroid objects and release the resources | 156 // of active MediaPlayerAndroid objects and release the resources |
| 157 // when needed. Currently we only count video resources as they are | 157 // when needed. Currently we only count video resources as they are |
| 158 // constrained by hardware and memory limits. | 158 // constrained by hardware and memory limits. |
| 159 virtual void OnMediaResourcesRequested(int player_id); | 159 virtual void OnMediaResourcesRequested(int player_id); |
| 160 | 160 |
| 161 // Similar to the above call, MediaPlayerAndroid must call this method when | 161 // Called when a player releases all decoding resources. |
| 162 // releasing all the decoding resources. | |
| 163 virtual void OnMediaResourcesReleased(int player_id); | 162 virtual void OnMediaResourcesReleased(int player_id); |
|
xhwang
2014/09/03 16:36:58
Please update the CL description/title:
"Remove B
xhwang
2014/09/03 16:36:58
nit: This is not a callback anymore. How about "Re
qinmin
2014/09/03 18:27:52
Done.
qinmin
2014/09/03 18:27:52
Done.
| |
| 164 | 163 |
| 165 #if defined(VIDEO_HOLE) | 164 #if defined(VIDEO_HOLE) |
| 166 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); | 165 void OnRequestExternalSurface(int player_id, const gfx::RectF& rect); |
| 167 #endif // defined(VIDEO_HOLE) | 166 #endif // defined(VIDEO_HOLE) |
| 168 | 167 |
| 169 RenderFrameHost* const render_frame_host_; | 168 RenderFrameHost* const render_frame_host_; |
| 170 | 169 |
| 171 // An array of managed players. | 170 // An array of managed players. |
| 172 ScopedVector<media::MediaPlayerAndroid> players_; | 171 ScopedVector<media::MediaPlayerAndroid> players_; |
| 173 | 172 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 192 | 191 |
| 193 // NOTE: Weak pointers must be invalidated before all other member variables. | 192 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 194 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 193 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 195 | 194 |
| 196 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 195 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 197 }; | 196 }; |
| 198 | 197 |
| 199 } // namespace content | 198 } // namespace content |
| 200 | 199 |
| 201 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 200 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |