| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 virtual void ExitFullscreen(bool release_media_player); | 63 virtual void ExitFullscreen(bool release_media_player); |
| 64 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface); | 64 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface); |
| 65 | 65 |
| 66 // Called when browser player wants the renderer media element to seek. | 66 // Called when browser player wants the renderer media element to seek. |
| 67 // Any actual seek started by renderer will be handled by browser in OnSeek(). | 67 // Any actual seek started by renderer will be handled by browser in OnSeek(). |
| 68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); | 68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); |
| 69 | 69 |
| 70 // Pauses all video players manages by this class. | 70 // Pauses all video players manages by this class. |
| 71 void PauseVideo(); | 71 void PauseVideo(); |
| 72 | 72 |
| 73 void ReleaseAllMediaPlayers(); |
| 74 |
| 73 // media::MediaPlayerManager overrides. | 75 // media::MediaPlayerManager overrides. |
| 74 virtual void OnTimeUpdate( | 76 virtual void OnTimeUpdate( |
| 75 int player_id, base::TimeDelta current_time) OVERRIDE; | 77 int player_id, base::TimeDelta current_time) OVERRIDE; |
| 76 virtual void OnMediaMetadataChanged( | 78 virtual void OnMediaMetadataChanged( |
| 77 int player_id, | 79 int player_id, |
| 78 base::TimeDelta duration, | 80 base::TimeDelta duration, |
| 79 int width, | 81 int width, |
| 80 int height, | 82 int height, |
| 81 bool success) OVERRIDE; | 83 bool success) OVERRIDE; |
| 82 virtual void OnPlaybackComplete(int player_id) OVERRIDE; | 84 virtual void OnPlaybackComplete(int player_id) OVERRIDE; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 194 |
| 193 // NOTE: Weak pointers must be invalidated before all other member variables. | 195 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 194 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 196 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 195 | 197 |
| 196 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 198 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 } // namespace content | 201 } // namespace content |
| 200 | 202 |
| 201 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 203 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |