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

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

Issue 185993004: Encrypted Media: Confine UUID code to MediaDrmBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated tests Created 6 years, 9 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698