| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 void OnRemoteRouteAvailabilityChanged(bool routes_available) override; | 206 void OnRemoteRouteAvailabilityChanged(bool routes_available) override; |
| 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 void setContentDecryptionModule( | |
| 217 blink::WebContentDecryptionModule* cdm, | |
| 218 blink::WebContentDecryptionModuleResult result) override; | |
| 219 | |
| 220 // WebMediaPlayerDelegate::Observer implementation. | 216 // WebMediaPlayerDelegate::Observer implementation. |
| 221 void OnHidden() override; | 217 void OnHidden() override; |
| 222 void OnShown() override; | 218 void OnShown() override; |
| 223 void OnSuspendRequested(bool must_suspend) override; | 219 void OnSuspendRequested(bool must_suspend) override; |
| 224 void OnPlay() override; | 220 void OnPlay() override; |
| 225 void OnPause() override; | 221 void OnPause() override; |
| 226 void OnVolumeMultiplierUpdate(double multiplier) override; | 222 void OnVolumeMultiplierUpdate(double multiplier) override; |
| 227 | 223 |
| 228 protected: | 224 protected: |
| 229 // Helper method to update the playing state. | 225 // Helper method to update the playing state. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // URL of the media file to be fetched. | 311 // URL of the media file to be fetched. |
| 316 GURL url_; | 312 GURL url_; |
| 317 | 313 |
| 318 // URL of the media file after |media_info_loader_| resolves all the | 314 // URL of the media file after |media_info_loader_| resolves all the |
| 319 // redirections. | 315 // redirections. |
| 320 GURL redirected_url_; | 316 GURL redirected_url_; |
| 321 | 317 |
| 322 // Media duration. | 318 // Media duration. |
| 323 base::TimeDelta duration_; | 319 base::TimeDelta duration_; |
| 324 | 320 |
| 325 // Flag to remember if we have a trusted duration_ value provided by | |
| 326 // MediaSourceDelegate notifying OnDurationChanged(). In this case, ignore | |
| 327 // any subsequent duration value passed to OnMediaMetadataChange(). | |
| 328 bool ignore_metadata_duration_change_; | |
| 329 | |
| 330 // Seek gets pending if another seek is in progress. Only last pending seek | 321 // Seek gets pending if another seek is in progress. Only last pending seek |
| 331 // will have effect. | 322 // will have effect. |
| 332 bool pending_seek_; | 323 bool pending_seek_; |
| 333 base::TimeDelta pending_seek_time_; | 324 base::TimeDelta pending_seek_time_; |
| 334 | 325 |
| 335 // Internal seek state. | 326 // Internal seek state. |
| 336 bool seeking_; | 327 bool seeking_; |
| 337 base::TimeDelta seek_time_; | 328 base::TimeDelta seek_time_; |
| 338 | 329 |
| 339 // Whether loading has progressed since the last call to didLoadingProgress. | 330 // Whether loading has progressed since the last call to didLoadingProgress. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 431 |
| 441 // NOTE: Weak pointers must be invalidated before all other member variables. | 432 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 442 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 433 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 443 | 434 |
| 444 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 435 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 445 }; | 436 }; |
| 446 | 437 |
| 447 } // namespace content | 438 } // namespace content |
| 448 | 439 |
| 449 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 440 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |