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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 virtual void OnSetVolume(int player_id, double volume); | 135 virtual void OnSetVolume(int player_id, double volume); |
136 virtual void OnSetPoster(int player_id, const GURL& poster); | 136 virtual void OnSetPoster(int player_id, const GURL& poster); |
137 virtual void OnReleaseResources(int player_id); | 137 virtual void OnReleaseResources(int player_id); |
138 virtual void OnDestroyPlayer(int player_id); | 138 virtual void OnDestroyPlayer(int player_id); |
139 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player); | 139 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player); |
140 void OnInitializeCDM(int media_keys_id, | 140 void OnInitializeCDM(int media_keys_id, |
141 const std::vector<uint8>& uuid, | 141 const std::vector<uint8>& uuid, |
142 const GURL& frame_url); | 142 const GURL& frame_url); |
143 void OnCreateSession(int media_keys_id, | 143 void OnCreateSession(int media_keys_id, |
144 uint32 session_id, | 144 uint32 session_id, |
145 MediaKeysHostMsg_CreateSession_Type content_type, | 145 CdmHostMsg_CreateSession_Type content_type, |
146 const std::vector<uint8>& init_data); | 146 const std::vector<uint8>& init_data); |
147 void OnUpdateSession(int media_keys_id, | 147 void OnUpdateSession(int media_keys_id, |
148 uint32 session_id, | 148 uint32 session_id, |
149 const std::vector<uint8>& response); | 149 const std::vector<uint8>& response); |
150 void OnReleaseSession(int media_keys_id, uint32 session_id); | 150 void OnReleaseSession(int media_keys_id, uint32 session_id); |
151 void OnSetMediaKeys(int player_id, int media_keys_id); | 151 void OnSetMediaKeys(int player_id, int media_keys_id); |
152 void OnDestroyCdm(int media_keys_id); | 152 void OnDestroyCdm(int media_keys_id); |
153 | 153 |
154 // Cancels all pending session creations associated with |media_keys_id|. | 154 // Cancels all pending session creations associated with |media_keys_id|. |
155 void CancelAllPendingSessionCreations(int media_keys_id); | 155 void CancelAllPendingSessionCreations(int media_keys_id); |
(...skipping 20 matching lines...) Expand all Loading... |
176 // |frame_url|. | 176 // |frame_url|. |
177 void AddDrmBridge(int media_keys_id, | 177 void AddDrmBridge(int media_keys_id, |
178 const std::vector<uint8>& uuid, | 178 const std::vector<uint8>& uuid, |
179 const GURL& frame_url); | 179 const GURL& frame_url); |
180 | 180 |
181 // Removes the DRM bridge with the specified id. | 181 // Removes the DRM bridge with the specified id. |
182 void RemoveDrmBridge(int media_keys_id); | 182 void RemoveDrmBridge(int media_keys_id); |
183 | 183 |
184 private: | 184 private: |
185 // If |permitted| is false, it does nothing but send | 185 // If |permitted| is false, it does nothing but send |
186 // |MediaKeysMsg_SessionError| IPC message. | 186 // |CdmMsg_SessionError| IPC message. |
187 // The primary use case is infobar permission callback, i.e., when infobar | 187 // The primary use case is infobar permission callback, i.e., when infobar |
188 // can decide user's intention either from interacting with the actual info | 188 // can decide user's intention either from interacting with the actual info |
189 // bar or from the saved preference. | 189 // bar or from the saved preference. |
190 void CreateSessionIfPermitted(int media_keys_id, | 190 void CreateSessionIfPermitted(int media_keys_id, |
191 uint32 session_id, | 191 uint32 session_id, |
192 const std::string& content_type, | 192 const std::string& content_type, |
193 const std::vector<uint8>& init_data, | 193 const std::vector<uint8>& init_data, |
194 bool permitted); | 194 bool permitted); |
195 | 195 |
196 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders | 196 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 242 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
243 | 243 |
244 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 244 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
245 | 245 |
246 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 246 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
247 }; | 247 }; |
248 | 248 |
249 } // namespace content | 249 } // namespace content |
250 | 250 |
251 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 251 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |