| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual void ReleaseMediaResources(int player_id) OVERRIDE; | 73 virtual void ReleaseMediaResources(int player_id) OVERRIDE; |
| 74 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; | 74 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; |
| 75 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE; | 75 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE; |
| 76 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE; | 76 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE; |
| 77 virtual media::MediaDrmBridge* GetDrmBridge(int media_keys_id) OVERRIDE; | 77 virtual media::MediaDrmBridge* GetDrmBridge(int media_keys_id) OVERRIDE; |
| 78 virtual void DestroyAllMediaPlayers() OVERRIDE; | 78 virtual void DestroyAllMediaPlayers() OVERRIDE; |
| 79 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek, | 79 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek, |
| 80 unsigned seek_request_id) OVERRIDE; | 80 unsigned seek_request_id) OVERRIDE; |
| 81 virtual void OnMediaConfigRequest(int player_id) OVERRIDE; | 81 virtual void OnMediaConfigRequest(int player_id) OVERRIDE; |
| 82 virtual void OnKeyAdded(int media_keys_id, | 82 virtual void OnKeyAdded(int media_keys_id, |
| 83 const std::string& key_system, | |
| 84 const std::string& session_id) OVERRIDE; | 83 const std::string& session_id) OVERRIDE; |
| 85 virtual void OnKeyError(int media_keys_id, | 84 virtual void OnKeyError(int media_keys_id, |
| 86 const std::string& key_system, | |
| 87 const std::string& session_id, | 85 const std::string& session_id, |
| 88 media::MediaKeys::KeyError error_code, | 86 media::MediaKeys::KeyError error_code, |
| 89 int system_code) OVERRIDE; | 87 int system_code) OVERRIDE; |
| 90 virtual void OnKeyMessage(int media_keys_id, | 88 virtual void OnKeyMessage(int media_keys_id, |
| 91 const std::string& key_system, | |
| 92 const std::string& session_id, | 89 const std::string& session_id, |
| 93 const std::string& message, | 90 const std::string& message, |
| 94 const std::string& destination_url) OVERRIDE; | 91 const std::string& destination_url) OVERRIDE; |
| 95 | 92 |
| 96 #if defined(GOOGLE_TV) | 93 #if defined(GOOGLE_TV) |
| 97 void AttachExternalVideoSurface(int player_id, jobject surface); | 94 void AttachExternalVideoSurface(int player_id, jobject surface); |
| 98 void DetachExternalVideoSurface(int player_id); | 95 void DetachExternalVideoSurface(int player_id); |
| 99 #endif | 96 #endif |
| 100 | 97 |
| 101 protected: | 98 protected: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 120 virtual void OnReleaseResources(int player_id); | 117 virtual void OnReleaseResources(int player_id); |
| 121 virtual void OnDestroyPlayer(int player_id); | 118 virtual void OnDestroyPlayer(int player_id); |
| 122 virtual void OnDemuxerReady( | 119 virtual void OnDemuxerReady( |
| 123 int player_id, | 120 int player_id, |
| 124 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); | 121 const media::MediaPlayerHostMsg_DemuxerReady_Params& params); |
| 125 virtual void OnReadFromDemuxerAck( | 122 virtual void OnReadFromDemuxerAck( |
| 126 int player_id, | 123 int player_id, |
| 127 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); | 124 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); |
| 128 void OnMediaSeekRequestAck(int player_id, unsigned seek_request_id); | 125 void OnMediaSeekRequestAck(int player_id, unsigned seek_request_id); |
| 129 void OnGenerateKeyRequest(int media_keys_id, | 126 void OnGenerateKeyRequest(int media_keys_id, |
| 130 const std::string& key_system, | |
| 131 const std::string& type, | 127 const std::string& type, |
| 132 const std::vector<uint8>& init_data); | 128 const std::vector<uint8>& init_data); |
| 133 void OnAddKey(int media_keys_id, | 129 void OnAddKey(int media_keys_id, |
| 134 const std::string& key_system, | |
| 135 const std::vector<uint8>& key, | 130 const std::vector<uint8>& key, |
| 136 const std::vector<uint8>& init_data, | 131 const std::vector<uint8>& init_data, |
| 137 const std::string& session_id); | 132 const std::string& session_id); |
| 138 void OnCancelKeyRequest(int media_keys_id, | 133 void OnCancelKeyRequest(int media_keys_id, const std::string& session_id); |
| 139 const std::string& key_system, | |
| 140 const std::string& session_id); | |
| 141 void OnDurationChanged(int player_id, const base::TimeDelta& duration); | 134 void OnDurationChanged(int player_id, const base::TimeDelta& duration); |
| 142 | 135 |
| 143 #if defined(GOOGLE_TV) | 136 #if defined(GOOGLE_TV) |
| 144 virtual void OnNotifyExternalSurface( | 137 virtual void OnNotifyExternalSurface( |
| 145 int player_id, bool is_request, const gfx::RectF& rect); | 138 int player_id, bool is_request, const gfx::RectF& rect); |
| 146 #endif | 139 #endif |
| 147 | 140 |
| 148 // Adds a given player to the list. | 141 // Adds a given player to the list. |
| 149 void AddPlayer(media::MediaPlayerAndroid* player); | 142 void AddPlayer(media::MediaPlayerAndroid* player); |
| 150 | 143 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 172 | 165 |
| 173 // Object for retrieving resources media players. | 166 // Object for retrieving resources media players. |
| 174 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 167 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 175 | 168 |
| 176 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); | 169 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerImpl); |
| 177 }; | 170 }; |
| 178 | 171 |
| 179 } // namespace content | 172 } // namespace content |
| 180 | 173 |
| 181 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ | 174 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_IMPL_H_ |
| OLD | NEW |