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