| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 OnHidden() override; |
| 218 void OnShown() override; | 218 void OnShown() override; |
| 219 void OnSuspendRequested(bool must_suspend) override; | 219 bool OnSuspendRequested(bool must_suspend) override; |
| 220 void OnPlay() override; | 220 void OnPlay() override; |
| 221 void OnPause() override; | 221 void OnPause() override; |
| 222 void OnVolumeMultiplierUpdate(double multiplier) override; | 222 void OnVolumeMultiplierUpdate(double multiplier) override; |
| 223 | 223 |
| 224 protected: | 224 protected: |
| 225 // Helper method to update the playing state. | 225 // Helper method to update the playing state. |
| 226 void UpdatePlayingState(bool is_playing_); | 226 void UpdatePlayingState(bool is_playing_); |
| 227 | 227 |
| 228 // Helper methods for posting task for setting states and update WebKit. | 228 // Helper methods for posting task for setting states and update WebKit. |
| 229 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 229 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 431 |
| 432 // NOTE: Weak pointers must be invalidated before all other member variables. | 432 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 433 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 433 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 434 | 434 |
| 435 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 435 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 436 }; | 436 }; |
| 437 | 437 |
| 438 } // namespace content | 438 } // namespace content |
| 439 | 439 |
| 440 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 440 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |