| 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 <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // WebContentsObserver overrides. | 56 // WebContentsObserver overrides. |
| 57 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 57 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 58 | 58 |
| 59 // Fullscreen video playback controls. | 59 // Fullscreen video playback controls. |
| 60 virtual void FullscreenPlayerPlay(); | 60 virtual void FullscreenPlayerPlay(); |
| 61 virtual void FullscreenPlayerPause(); | 61 virtual void FullscreenPlayerPause(); |
| 62 virtual void FullscreenPlayerSeek(int msec); | 62 virtual void FullscreenPlayerSeek(int msec); |
| 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 virtual void SuspendFullscreen(); | |
| 66 virtual void ResumeFullscreen(gfx::ScopedJavaSurface surface); | |
| 67 | 65 |
| 68 // Called when browser player wants the renderer media element to seek. | 66 // Called when browser player wants the renderer media element to seek. |
| 69 // 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(). |
| 70 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); | 68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); |
| 71 | 69 |
| 72 // media::MediaPlayerManager overrides. | 70 // media::MediaPlayerManager overrides. |
| 73 virtual void OnTimeUpdate( | 71 virtual void OnTimeUpdate( |
| 74 int player_id, base::TimeDelta current_time) OVERRIDE; | 72 int player_id, base::TimeDelta current_time) OVERRIDE; |
| 75 virtual void OnMediaMetadataChanged( | 73 virtual void OnMediaMetadataChanged( |
| 76 int player_id, | 74 int player_id, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // The fullscreen video view object or NULL if video is not played in | 223 // The fullscreen video view object or NULL if video is not played in |
| 226 // fullscreen. | 224 // fullscreen. |
| 227 scoped_ptr<ContentVideoView> video_view_; | 225 scoped_ptr<ContentVideoView> video_view_; |
| 228 | 226 |
| 229 // Player ID of the fullscreen media player. | 227 // Player ID of the fullscreen media player. |
| 230 int fullscreen_player_id_; | 228 int fullscreen_player_id_; |
| 231 | 229 |
| 232 // The player ID pending to enter fullscreen. | 230 // The player ID pending to enter fullscreen. |
| 233 int pending_fullscreen_player_id_; | 231 int pending_fullscreen_player_id_; |
| 234 | 232 |
| 233 // Whether the fullscreen player has been Release()-d. |
| 234 bool fullscreen_player_is_released_; |
| 235 |
| 235 WebContents* web_contents_; | 236 WebContents* web_contents_; |
| 236 | 237 |
| 237 // Object for retrieving resources media players. | 238 // Object for retrieving resources media players. |
| 238 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 239 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 239 | 240 |
| 240 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 241 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 241 | 242 |
| 242 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 243 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 243 }; | 244 }; |
| 244 | 245 |
| 245 } // namespace content | 246 } // namespace content |
| 246 | 247 |
| 247 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 248 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |