| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int player_id, int width, int height) OVERRIDE; | 65 int player_id, int width, int height) OVERRIDE; |
| 66 virtual void OnReadFromDemuxer( | 66 virtual void OnReadFromDemuxer( |
| 67 int player_id, | 67 int player_id, |
| 68 media::DemuxerStream::Type type, | 68 media::DemuxerStream::Type type, |
| 69 bool seek_done) OVERRIDE; | 69 bool seek_done) OVERRIDE; |
| 70 virtual void RequestMediaResources( | 70 virtual void RequestMediaResources( |
| 71 media::MediaPlayerAndroid* player) OVERRIDE; | 71 media::MediaPlayerAndroid* player) OVERRIDE; |
| 72 virtual void ReleaseMediaResources( | 72 virtual void ReleaseMediaResources( |
| 73 media::MediaPlayerAndroid* player) OVERRIDE; | 73 media::MediaPlayerAndroid* player) OVERRIDE; |
| 74 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; | 74 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; |
| 75 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek) |
| 76 OVERRIDE; |
| 75 | 77 |
| 76 // Release all the players managed by this object. | 78 // Release all the players managed by this object. |
| 77 void DestroyAllMediaPlayers(); | 79 void DestroyAllMediaPlayers(); |
| 78 | 80 |
| 79 #if defined(GOOGLE_TV) | 81 #if defined(GOOGLE_TV) |
| 80 void AttachExternalVideoSurface(int player_id, jobject surface); | 82 void AttachExternalVideoSurface(int player_id, jobject surface); |
| 81 void DetachExternalVideoSurface(int player_id); | 83 void DetachExternalVideoSurface(int player_id); |
| 82 #endif | 84 #endif |
| 83 | 85 |
| 84 media::MediaPlayerAndroid* GetFullscreenPlayer(); | 86 media::MediaPlayerAndroid* GetFullscreenPlayer(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 95 void OnSeek(int player_id, base::TimeDelta time); | 97 void OnSeek(int player_id, base::TimeDelta time); |
| 96 void OnPause(int player_id); | 98 void OnPause(int player_id); |
| 97 void OnReleaseResources(int player_id); | 99 void OnReleaseResources(int player_id); |
| 98 void OnDestroyPlayer(int player_id); | 100 void OnDestroyPlayer(int player_id); |
| 99 void OnDemuxerReady( | 101 void OnDemuxerReady( |
| 100 int player_id, | 102 int player_id, |
| 101 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); | 103 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); |
| 102 void OnReadFromDemuxerAck( | 104 void OnReadFromDemuxerAck( |
| 103 int player_id, | 105 int player_id, |
| 104 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); | 106 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); |
| 107 void OnMediaSeekRequestAck(int player_id); |
| 105 | 108 |
| 106 #if defined(GOOGLE_TV) | 109 #if defined(GOOGLE_TV) |
| 107 void OnNotifyExternalSurface( | 110 void OnNotifyExternalSurface( |
| 108 int player_id, bool is_request, const gfx::RectF& rect); | 111 int player_id, bool is_request, const gfx::RectF& rect); |
| 109 #endif | 112 #endif |
| 110 | 113 |
| 111 // An array of managed players. | 114 // An array of managed players. |
| 112 ScopedVector<media::MediaPlayerAndroid> players_; | 115 ScopedVector<media::MediaPlayerAndroid> players_; |
| 113 | 116 |
| 114 // The fullscreen video view object. | 117 // The fullscreen video view object. |
| 115 ContentVideoView video_view_; | 118 ContentVideoView video_view_; |
| 116 | 119 |
| 117 // Player ID of the fullscreen media player. | 120 // Player ID of the fullscreen media player. |
| 118 int fullscreen_player_id_; | 121 int fullscreen_player_id_; |
| 119 | 122 |
| 120 WebContents* web_contents_; | 123 WebContents* web_contents_; |
| 121 | 124 |
| 122 // Object for retrieving resources media players. | 125 // Object for retrieving resources media players. |
| 123 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 126 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 124 | 127 |
| 125 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); | 128 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); |
| 126 }; | 129 }; |
| 127 | 130 |
| 128 } // namespace content | 131 } // namespace content |
| 129 | 132 |
| 130 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ | 133 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ |
| OLD | NEW |