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_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 | 207 |
208 // Called when the player is released. | 208 // Called when the player is released. |
209 void OnPlayerReleased() override; | 209 void OnPlayerReleased() override; |
210 | 210 |
211 // This function is called by the RendererMediaPlayerManager to pause the | 211 // This function is called by the RendererMediaPlayerManager to pause the |
212 // video and release the media player and surface texture when we switch tabs. | 212 // video and release the media player and surface texture when we switch tabs. |
213 // However, the actual GlTexture is not released to keep the video screenshot. | 213 // However, the actual GlTexture is not released to keep the video screenshot. |
214 void SuspendAndReleaseResources() override; | 214 void SuspendAndReleaseResources() override; |
215 | 215 |
216 // WebMediaPlayerDelegate::Observer implementation. | 216 // WebMediaPlayerDelegate::Observer implementation. |
217 void OnHidden() override; | 217 void OnFrameHidden() override; |
218 void OnShown() override; | 218 void OnFrameClosed() override; |
219 bool OnSuspendRequested(bool must_suspend) override; | 219 void OnFrameShown() override; |
watk
2016/12/10 00:01:30
This is great
| |
220 bool OnIdleTimeout() override; | |
220 void OnPlay() override; | 221 void OnPlay() override; |
221 void OnPause() override; | 222 void OnPause() override; |
222 void OnVolumeMultiplierUpdate(double multiplier) override; | 223 void OnVolumeMultiplierUpdate(double multiplier) override; |
223 | 224 |
224 protected: | 225 protected: |
225 // Helper method to update the playing state. | 226 // Helper method to update the playing state. |
226 void UpdatePlayingState(bool is_playing_); | 227 void UpdatePlayingState(bool is_playing_); |
227 | 228 |
228 // Helper methods for posting task for setting states and update WebKit. | 229 // Helper methods for posting task for setting states and update WebKit. |
229 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 230 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
426 | 427 |
427 // NOTE: Weak pointers must be invalidated before all other member variables. | 428 // NOTE: Weak pointers must be invalidated before all other member variables. |
428 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 429 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
429 | 430 |
430 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 431 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
431 }; | 432 }; |
432 | 433 |
433 } // namespace content | 434 } // namespace content |
434 | 435 |
435 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 436 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |