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

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

Issue 103583005: Restart fullscreen video playback when switching back from background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed one more buggy line and the fullscreen_player_is_released_ member which is not necessary now 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Registers and unregisters a WebMediaPlayerAndroid object. 106 // Registers and unregisters a WebMediaPlayerAndroid object.
107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); 107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
108 void UnregisterMediaPlayer(int player_id); 108 void UnregisterMediaPlayer(int player_id);
109 109
110 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid 110 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid
111 // 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
112 // 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
113 // used in other methods. 113 // used in other methods.
114 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys); 114 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys);
115 115
116 // Requests the player that is currently entered fullscreen (if any)
qinmin 2013/12/09 23:53:19 nit: s/is/has/
117 // to exit.
118 void SuspendFullscreenVideo();
119
120 // Requests the player that exited fullscreen in result of
121 // SuspendFullscreen (if any) to reenter.
122 void ResumeFullscreenVideo();
123
116 // Releases the media resources managed by this object when a video 124 // Releases the media resources managed by this object when a video
117 // is playing. 125 // is playing.
118 void ReleaseVideoResources(); 126 void ReleaseVideoResources();
119 127
120 // Checks whether a player can enter fullscreen. 128 // Checks whether a player can enter fullscreen.
121 bool CanEnterFullscreen(blink::WebFrame* frame); 129 bool CanEnterFullscreen(blink::WebFrame* frame);
122 130
123 // Called when a player entered or exited fullscreen. 131 // Called when a player entered or exited fullscreen.
124 void DidEnterFullscreen(blink::WebFrame* frame); 132 void DidEnterFullscreen(blink::WebFrame* frame);
125 void DidExitFullscreen(); 133 void DidExitFullscreen();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Info for all available WebMediaPlayerAndroid on a page; kept so that 185 // Info for all available WebMediaPlayerAndroid on a page; kept so that
178 // we can enumerate them to send updates about tab focus and visibility. 186 // we can enumerate them to send updates about tab focus and visibility.
179 std::map<int, WebMediaPlayerAndroid*> media_players_; 187 std::map<int, WebMediaPlayerAndroid*> media_players_;
180 188
181 // Info for all available ProxyMediaKeys. There must be at most one 189 // Info for all available ProxyMediaKeys. There must be at most one
182 // ProxyMediaKeys for each available WebMediaPlayerAndroid. 190 // ProxyMediaKeys for each available WebMediaPlayerAndroid.
183 std::map<int, ProxyMediaKeys*> media_keys_; 191 std::map<int, ProxyMediaKeys*> media_keys_;
184 192
185 int next_media_player_id_; 193 int next_media_player_id_;
186 194
195 // ID of the player that entered fullscreen.
196 int fullscreen_player_id_;
197
198 // Preserves the value of fullscreen_player_id_ between PauseVideo
199 // and ResumeVideo.
200 int paused_fullscreen_player_id_;
201
187 // WebFrame of the fullscreen video. 202 // WebFrame of the fullscreen video.
188 blink::WebFrame* fullscreen_frame_; 203 blink::WebFrame* fullscreen_frame_;
189 204
190 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); 205 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager);
191 }; 206 };
192 207
193 } // namespace content 208 } // namespace content
194 209
195 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 210 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/public/browser/android/content_view_core.h ('k') | content/renderer/media/android/renderer_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698