| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 media::DemuxerStream::Type type, | 66 media::DemuxerStream::Type type, |
| 67 bool seek_done) OVERRIDE; | 67 bool seek_done) OVERRIDE; |
| 68 virtual void RequestMediaResources( | 68 virtual void RequestMediaResources( |
| 69 media::MediaPlayerAndroid* player) OVERRIDE; | 69 media::MediaPlayerAndroid* player) OVERRIDE; |
| 70 virtual void ReleaseMediaResources( | 70 virtual void ReleaseMediaResources( |
| 71 media::MediaPlayerAndroid* player) OVERRIDE; | 71 media::MediaPlayerAndroid* player) OVERRIDE; |
| 72 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; | 72 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; |
| 73 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE; | 73 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE; |
| 74 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE; | 74 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE; |
| 75 virtual void DestroyAllMediaPlayers() OVERRIDE; | 75 virtual void DestroyAllMediaPlayers() OVERRIDE; |
| 76 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek, |
| 77 bool request_surface) OVERRIDE; |
| 76 | 78 |
| 77 #if defined(GOOGLE_TV) | 79 #if defined(GOOGLE_TV) |
| 78 void AttachExternalVideoSurface(int player_id, jobject surface); | 80 void AttachExternalVideoSurface(int player_id, jobject surface); |
| 79 void DetachExternalVideoSurface(int player_id); | 81 void DetachExternalVideoSurface(int player_id); |
| 80 #endif | 82 #endif |
| 81 | 83 |
| 82 protected: | 84 protected: |
| 83 friend MediaPlayerManager* MediaPlayerManager::Create( | 85 friend MediaPlayerManager* MediaPlayerManager::Create( |
| 84 content::RenderViewHost*); | 86 content::RenderViewHost*); |
| 85 | 87 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 98 void OnSeek(int player_id, base::TimeDelta time); | 100 void OnSeek(int player_id, base::TimeDelta time); |
| 99 void OnPause(int player_id); | 101 void OnPause(int player_id); |
| 100 void OnReleaseResources(int player_id); | 102 void OnReleaseResources(int player_id); |
| 101 void OnDestroyPlayer(int player_id); | 103 void OnDestroyPlayer(int player_id); |
| 102 void OnDemuxerReady( | 104 void OnDemuxerReady( |
| 103 int player_id, | 105 int player_id, |
| 104 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); | 106 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); |
| 105 void OnReadFromDemuxerAck( | 107 void OnReadFromDemuxerAck( |
| 106 int player_id, | 108 int player_id, |
| 107 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); | 109 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); |
| 110 void OnMediaSeekRequestAck(int player_id); |
| 108 | 111 |
| 109 #if defined(GOOGLE_TV) | 112 #if defined(GOOGLE_TV) |
| 110 void OnNotifyExternalSurface( | 113 void OnNotifyExternalSurface( |
| 111 int player_id, bool is_request, const gfx::RectF& rect); | 114 int player_id, bool is_request, const gfx::RectF& rect); |
| 112 #endif | 115 #endif |
| 113 | 116 |
| 114 // An array of managed players. | 117 // An array of managed players. |
| 115 ScopedVector<media::MediaPlayerAndroid> players_; | 118 ScopedVector<media::MediaPlayerAndroid> players_; |
| 116 | 119 |
| 117 // The fullscreen video view object. | 120 // The fullscreen video view object. |
| 118 ContentVideoView video_view_; | 121 ContentVideoView video_view_; |
| 119 | 122 |
| 120 // Player ID of the fullscreen media player. | 123 // Player ID of the fullscreen media player. |
| 121 int fullscreen_player_id_; | 124 int fullscreen_player_id_; |
| 122 | 125 |
| 123 WebContents* web_contents_; | 126 WebContents* web_contents_; |
| 124 | 127 |
| 125 // Object for retrieving resources media players. | 128 // Object for retrieving resources media players. |
| 126 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 129 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 127 | 130 |
| 128 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); | 131 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace content | 134 } // namespace content |
| 132 | 135 |
| 133 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ | 136 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ |
| OLD | NEW |