Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: content/browser/media/android/browser_media_player_manager.h

Issue 131653003: Support LoadSession() in MediaKeys and PPP_ContentDecryptor_Private interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 virtual void OnPause(int player_id, bool is_media_related_action); 136 virtual void OnPause(int player_id, bool is_media_related_action);
137 virtual void OnSetVolume(int player_id, double volume); 137 virtual void OnSetVolume(int player_id, double volume);
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 media_keys_id, 141 void OnInitializeCDM(int media_keys_id,
142 const std::vector<uint8>& uuid, 142 const std::vector<uint8>& uuid,
143 const GURL& frame_url); 143 const GURL& frame_url);
144 void OnCreateSession(int media_keys_id, 144 void OnCreateSession(int media_keys_id,
145 uint32 session_id, 145 uint32 session_id,
146 MediaKeysHostMsg_CreateSession_Type type, 146 MediaKeysHostMsg_CreateSession_Type content_type,
147 const std::vector<uint8>& init_data); 147 const std::vector<uint8>& init_data);
148 void OnUpdateSession(int media_keys_id, 148 void OnUpdateSession(int media_keys_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 media_keys_id, uint32 session_id); 151 void OnReleaseSession(int media_keys_id, uint32 session_id);
152 void OnSetMediaKeys(int player_id, int media_keys_id); 152 void OnSetMediaKeys(int player_id, int media_keys_id);
153 153
154 void OnCancelAllPendingSessionCreations(int media_keys_id); 154 void OnCancelAllPendingSessionCreations(int media_keys_id);
155 155
156 #if defined(VIDEO_HOLE) 156 #if defined(VIDEO_HOLE)
(...skipping 24 matching lines...) Expand all
181 void RemoveDrmBridge(int media_keys_id); 181 void RemoveDrmBridge(int media_keys_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 // |MediaKeysMsg_SessionError| IPC message. 185 // |MediaKeysMsg_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
188 // bar or from the saved preference. 188 // bar or from the saved preference.
189 void CreateSessionIfPermitted(int media_keys_id, 189 void CreateSessionIfPermitted(int media_keys_id,
190 uint32 session_id, 190 uint32 session_id,
191 const std::string& type, 191 const std::string& content_type,
192 const std::vector<uint8>& init_data, 192 const std::vector<uint8>& init_data,
193 bool permitted); 193 bool permitted);
194 194
195 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders 195 // Constructs a MediaPlayerAndroid object. Declared static to permit embedders
196 // to override functionality. 196 // to override functionality.
197 // 197 //
198 // Objects must call |manager->RequestMediaResources()| before decoding 198 // Objects must call |manager->RequestMediaResources()| before decoding
199 // and |manager->ReleaseMediaSources()| after finishing. This allows the 199 // and |manager->ReleaseMediaSources()| after finishing. This allows the
200 // manager to track decoding resources across the process and free them as 200 // manager to track decoding resources across the process and free them as
201 // needed. 201 // needed.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; 238 scoped_ptr<media::MediaResourceGetter> media_resource_getter_;
239 239
240 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; 240 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_;
241 241
242 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); 242 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager);
243 }; 243 };
244 244
245 } // namespace content 245 } // namespace content
246 246
247 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 247 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698