| 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_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 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // Sets the poster image. | 66 // Sets the poster image. |
| 67 void SetPoster(int player_id, const GURL& poster); | 67 void SetPoster(int player_id, const GURL& poster); |
| 68 | 68 |
| 69 // Releases resources for the player. | 69 // Releases resources for the player. |
| 70 void ReleaseResources(int player_id); | 70 void ReleaseResources(int player_id); |
| 71 | 71 |
| 72 // Destroys the player in the browser process | 72 // Destroys the player in the browser process |
| 73 void DestroyPlayer(int player_id); | 73 void DestroyPlayer(int player_id); |
| 74 | 74 |
| 75 // Requests remote playback if possible |
| 76 void RequestRemotePlayback(int player_id); |
| 77 |
| 78 // Requests control of remote playback |
| 79 void RequestRemotePlaybackControl(int player_id); |
| 80 |
| 75 // Requests the player to enter fullscreen. | 81 // Requests the player to enter fullscreen. |
| 76 void EnterFullscreen(int player_id, blink::WebFrame* frame); | 82 void EnterFullscreen(int player_id, blink::WebFrame* frame); |
| 77 | 83 |
| 78 // Requests the player to exit fullscreen. | 84 // Requests the player to exit fullscreen. |
| 79 void ExitFullscreen(int player_id); | 85 void ExitFullscreen(int player_id); |
| 80 | 86 |
| 81 // Requests the player with |player_id| to use the CDM with |cdm_id|. | 87 // Requests the player with |player_id| to use the CDM with |cdm_id|. |
| 82 // Does nothing if |cdm_id| is kInvalidCdmId. | 88 // Does nothing if |cdm_id| is kInvalidCdmId. |
| 83 // TODO(xhwang): Update this when we implement setCdm(0). | 89 // TODO(xhwang): Update this when we implement setCdm(0). |
| 84 void SetCdm(int player_id, int cdm_id); | 90 void SetCdm(int player_id, int cdm_id); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void OnTimeUpdate(int player_id, base::TimeDelta current_time); | 142 void OnTimeUpdate(int player_id, base::TimeDelta current_time); |
| 137 void OnMediaPlayerReleased(int player_id); | 143 void OnMediaPlayerReleased(int player_id); |
| 138 void OnConnectedToRemoteDevice(int player_id, | 144 void OnConnectedToRemoteDevice(int player_id, |
| 139 const std::string& remote_playback_message); | 145 const std::string& remote_playback_message); |
| 140 void OnDisconnectedFromRemoteDevice(int player_id); | 146 void OnDisconnectedFromRemoteDevice(int player_id); |
| 141 void OnDidExitFullscreen(int player_id); | 147 void OnDidExitFullscreen(int player_id); |
| 142 void OnDidEnterFullscreen(int player_id); | 148 void OnDidEnterFullscreen(int player_id); |
| 143 void OnPlayerPlay(int player_id); | 149 void OnPlayerPlay(int player_id); |
| 144 void OnPlayerPause(int player_id); | 150 void OnPlayerPause(int player_id); |
| 145 void OnRequestFullscreen(int player_id); | 151 void OnRequestFullscreen(int player_id); |
| 152 void OnRemoteRouteAvailabilityChanged(int player_id, bool routes_available); |
| 146 void OnPauseVideo(); | 153 void OnPauseVideo(); |
| 147 | 154 |
| 148 // Release all video player resources. | 155 // Release all video player resources. |
| 149 // If something is in progress the resource will not be freed. It will | 156 // If something is in progress the resource will not be freed. It will |
| 150 // only be freed once the tab is destroyed or if the user navigates away | 157 // only be freed once the tab is destroyed or if the user navigates away |
| 151 // via WebMediaPlayerAndroid::Destroy. | 158 // via WebMediaPlayerAndroid::Destroy. |
| 152 void ReleaseVideoResources(); | 159 void ReleaseVideoResources(); |
| 153 | 160 |
| 154 // Info for all available WebMediaPlayerAndroid on a page; kept so that | 161 // Info for all available WebMediaPlayerAndroid on a page; kept so that |
| 155 // we can enumerate them to send updates about tab focus and visibility. | 162 // we can enumerate them to send updates about tab focus and visibility. |
| 156 std::map<int, WebMediaPlayerAndroid*> media_players_; | 163 std::map<int, WebMediaPlayerAndroid*> media_players_; |
| 157 | 164 |
| 158 int next_media_player_id_; | 165 int next_media_player_id_; |
| 159 | 166 |
| 160 // WebFrame of the fullscreen video. | 167 // WebFrame of the fullscreen video. |
| 161 blink::WebFrame* fullscreen_frame_; | 168 blink::WebFrame* fullscreen_frame_; |
| 162 | 169 |
| 163 // WebFrame of pending fullscreen request. | 170 // WebFrame of pending fullscreen request. |
| 164 blink::WebFrame* pending_fullscreen_frame_; | 171 blink::WebFrame* pending_fullscreen_frame_; |
| 165 | 172 |
| 166 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 173 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
| 167 }; | 174 }; |
| 168 | 175 |
| 169 } // namespace content | 176 } // namespace content |
| 170 | 177 |
| 171 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 178 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |