| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 int demuxer_client_id); | 130 int demuxer_client_id); |
| 131 virtual void OnStart(int player_id); | 131 virtual void OnStart(int player_id); |
| 132 virtual void OnSeek(int player_id, const base::TimeDelta& time); | 132 virtual void OnSeek(int player_id, const base::TimeDelta& time); |
| 133 virtual void OnPause(int player_id, bool is_media_related_action); | 133 virtual void OnPause(int player_id, bool is_media_related_action); |
| 134 virtual void OnSetVolume(int player_id, double volume); | 134 virtual void OnSetVolume(int player_id, double volume); |
| 135 virtual void OnSetPoster(int player_id, const GURL& poster); | 135 virtual void OnSetPoster(int player_id, const GURL& poster); |
| 136 virtual void OnReleaseResources(int player_id); | 136 virtual void OnReleaseResources(int player_id); |
| 137 virtual void OnDestroyPlayer(int player_id); | 137 virtual void OnDestroyPlayer(int player_id); |
| 138 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player); | 138 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player); |
| 139 void OnInitializeCdm(int cdm_id, | 139 void OnInitializeCdm(int cdm_id, |
| 140 const std::vector<uint8>& uuid, | 140 const std::string& key_system, |
| 141 const GURL& frame_url); | 141 const GURL& frame_url); |
| 142 void OnCreateSession(int cdm_id, | 142 void OnCreateSession(int cdm_id, |
| 143 uint32 session_id, | 143 uint32 session_id, |
| 144 CdmHostMsg_CreateSession_ContentType content_type, | 144 CdmHostMsg_CreateSession_ContentType content_type, |
| 145 const std::vector<uint8>& init_data); | 145 const std::vector<uint8>& init_data); |
| 146 void OnUpdateSession(int cdm_id, | 146 void OnUpdateSession(int cdm_id, |
| 147 uint32 session_id, | 147 uint32 session_id, |
| 148 const std::vector<uint8>& response); | 148 const std::vector<uint8>& response); |
| 149 void OnReleaseSession(int cdm_id, uint32 session_id); | 149 void OnReleaseSession(int cdm_id, uint32 session_id); |
| 150 void OnSetMediaKeys(int player_id, int cdm_id); | 150 void OnSetMediaKeys(int player_id, int cdm_id); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 164 // Removes the player with the specified id. | 164 // Removes the player with the specified id. |
| 165 void RemovePlayer(int player_id); | 165 void RemovePlayer(int player_id); |
| 166 | 166 |
| 167 // Replaces a player with the specified id with a given MediaPlayerAndroid | 167 // Replaces a player with the specified id with a given MediaPlayerAndroid |
| 168 // object. This will also return the original MediaPlayerAndroid object that | 168 // object. This will also return the original MediaPlayerAndroid object that |
| 169 // was replaced. | 169 // was replaced. |
| 170 scoped_ptr<media::MediaPlayerAndroid> SwapPlayer( | 170 scoped_ptr<media::MediaPlayerAndroid> SwapPlayer( |
| 171 int player_id, | 171 int player_id, |
| 172 media::MediaPlayerAndroid* player); | 172 media::MediaPlayerAndroid* player); |
| 173 | 173 |
| 174 // Adds a new MediaDrmBridge for the given |uuid|, |cdm_id|, and | 174 // Adds a new MediaDrmBridge for the given |key_system|, |cdm_id|, and |
| 175 // |frame_url|. | 175 // |frame_url|. |
| 176 void AddDrmBridge(int cdm_id, | 176 void AddDrmBridge(int cdm_id, |
| 177 const std::vector<uint8>& uuid, | 177 const std::string& key_system, |
| 178 const GURL& frame_url); | 178 const GURL& frame_url); |
| 179 | 179 |
| 180 // Removes the DRM bridge with the specified id. | 180 // Removes the DRM bridge with the specified id. |
| 181 void RemoveDrmBridge(int cdm_id); | 181 void RemoveDrmBridge(int cdm_id); |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 // If |permitted| is false, it does nothing but send | 184 // If |permitted| is false, it does nothing but send |
| 185 // |CdmMsg_SessionError| IPC message. | 185 // |CdmMsg_SessionError| IPC message. |
| 186 // The primary use case is infobar permission callback, i.e., when infobar | 186 // The primary use case is infobar permission callback, i.e., when infobar |
| 187 // can decide user's intention either from interacting with the actual info | 187 // can decide user's intention either from interacting with the actual info |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 246 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 247 | 247 |
| 248 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 248 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 249 | 249 |
| 250 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 250 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 251 }; | 251 }; |
| 252 | 252 |
| 253 } // namespace content | 253 } // namespace content |
| 254 | 254 |
| 255 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 255 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |