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

Side by Side Diff: content/renderer/media/android/renderer_media_player_manager.h

Issue 107413006: Dismiss EME infobar when WebMediaPlayer is destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
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_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const std::vector<uint8>& uuid, 94 const std::vector<uint8>& uuid,
95 const GURL& frame_url); 95 const GURL& frame_url);
96 void CreateSession(int media_keys_id, 96 void CreateSession(int media_keys_id,
97 uint32 session_id, 97 uint32 session_id,
98 const std::string& type, 98 const std::string& type,
99 const std::vector<uint8>& init_data); 99 const std::vector<uint8>& init_data);
100 void UpdateSession(int media_keys_id, 100 void UpdateSession(int media_keys_id,
101 uint32 session_id, 101 uint32 session_id,
102 const std::vector<uint8>& response); 102 const std::vector<uint8>& response);
103 void ReleaseSession(int media_keys_id, uint32 session_id); 103 void ReleaseSession(int media_keys_id, uint32 session_id);
104 void CancelSession(int media_keys_id, uint32 session_id);
ddorwin 2013/12/20 23:59:52 ditto
Kibeom Kim (inactive) 2013/12/30 12:33:05 Done.
104 105
105 // Registers and unregisters a WebMediaPlayerAndroid object. 106 // Registers and unregisters a WebMediaPlayerAndroid object.
106 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); 107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
107 void UnregisterMediaPlayer(int player_id); 108 void UnregisterMediaPlayer(int player_id);
108 109
109 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid 110 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid
110 // object already registered for this id, and it is unregistered when the 111 // object already registered for this id, and it is unregistered when the
111 // player is unregistered. For now |media_keys_id| is the same as player_id 112 // player is unregistered. For now |media_keys_id| is the same as player_id
112 // used in other methods. 113 // used in other methods.
113 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys); 114 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void OnRequestFullscreen(int player_id); 162 void OnRequestFullscreen(int player_id);
162 void OnSessionCreated(int media_keys_id, 163 void OnSessionCreated(int media_keys_id,
163 uint32 session_id, 164 uint32 session_id,
164 const std::string& web_session_id); 165 const std::string& web_session_id);
165 void OnSessionMessage(int media_keys_id, 166 void OnSessionMessage(int media_keys_id,
166 uint32 session_id, 167 uint32 session_id,
167 const std::vector<uint8>& message, 168 const std::vector<uint8>& message,
168 const std::string& destination_url); 169 const std::string& destination_url);
169 void OnSessionReady(int media_keys_id, uint32 session_id); 170 void OnSessionReady(int media_keys_id, uint32 session_id);
170 void OnSessionClosed(int media_keys_id, uint32 session_id); 171 void OnSessionClosed(int media_keys_id, uint32 session_id);
172 void OnSessionApproved(int media_keys_id, uint32 session_id, bool success);
171 void OnSessionError(int media_keys_id, 173 void OnSessionError(int media_keys_id,
172 uint32 session_id, 174 uint32 session_id,
173 media::MediaKeys::KeyError error_code, 175 media::MediaKeys::KeyError error_code,
174 int system_code); 176 int system_code);
175 177
176 // Info for all available WebMediaPlayerAndroid on a page; kept so that 178 // Info for all available WebMediaPlayerAndroid on a page; kept so that
177 // we can enumerate them to send updates about tab focus and visibility. 179 // we can enumerate them to send updates about tab focus and visibility.
178 std::map<int, WebMediaPlayerAndroid*> media_players_; 180 std::map<int, WebMediaPlayerAndroid*> media_players_;
179 181
180 // Info for all available ProxyMediaKeys. There must be at most one 182 // Info for all available ProxyMediaKeys. There must be at most one
181 // ProxyMediaKeys for each available WebMediaPlayerAndroid. 183 // ProxyMediaKeys for each available WebMediaPlayerAndroid.
182 std::map<int, ProxyMediaKeys*> media_keys_; 184 std::map<int, ProxyMediaKeys*> media_keys_;
183 185
184 int next_media_player_id_; 186 int next_media_player_id_;
185 187
186 // WebFrame of the fullscreen video. 188 // WebFrame of the fullscreen video.
187 blink::WebFrame* fullscreen_frame_; 189 blink::WebFrame* fullscreen_frame_;
188 190
189 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); 191 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager);
190 }; 192 };
191 193
192 } // namespace content 194 } // namespace content
193 195
194 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 196 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698