| 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 | 152 |
| 153 void OnCancelAllPendingSessionCreations(int media_keys_id); | 153 void OnCancelAllPendingSessionCreations(int media_keys_id); |
| 154 | 154 |
| 155 #if defined(VIDEO_HOLE) | 155 #if defined(VIDEO_HOLE) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 174 // |frame_url|. | 174 // |frame_url|. |
| 175 void AddDrmBridge(int media_keys_id, | 175 void AddDrmBridge(int media_keys_id, |
| 176 const std::vector<uint8>& uuid, | 176 const std::vector<uint8>& uuid, |
| 177 const GURL& frame_url); | 177 const GURL& frame_url); |
| 178 | 178 |
| 179 // Removes the DRM bridge with the specified id. | 179 // Removes the DRM bridge with the specified id. |
| 180 void RemoveDrmBridge(int media_keys_id); | 180 void RemoveDrmBridge(int media_keys_id); |
| 181 | 181 |
| 182 private: | 182 private: |
| 183 // If |permitted| is false, it does nothing but send | 183 // If |permitted| is false, it does nothing but send |
| 184 // |MediaKeysMsg_SessionError| IPC message. | 184 // |CdmMsg_SessionError| IPC message. |
| 185 // The primary use case is infobar permission callback, i.e., when infobar | 185 // The primary use case is infobar permission callback, i.e., when infobar |
| 186 // can decide user's intention either from interacting with the actual info | 186 // can decide user's intention either from interacting with the actual info |
| 187 // bar or from the saved preference. | 187 // bar or from the saved preference. |
| 188 void CreateSessionIfPermitted(int media_keys_id, | 188 void CreateSessionIfPermitted(int media_keys_id, |
| 189 uint32 session_id, | 189 uint32 session_id, |
| 190 const std::string& content_type, | 190 const std::string& content_type, |
| 191 const std::vector<uint8>& init_data, | 191 const std::vector<uint8>& init_data, |
| 192 bool permitted); | 192 bool permitted); |
| 193 | 193 |
| 194 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders | 194 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; | 240 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; |
| 241 | 241 |
| 242 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 242 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 243 | 243 |
| 244 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 244 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 245 }; | 245 }; |
| 246 | 246 |
| 247 } // namespace content | 247 } // namespace content |
| 248 | 248 |
| 249 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 249 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |