| 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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // (Public for testing.) | 234 // (Public for testing.) |
| 235 struct PlayState { | 235 struct PlayState { |
| 236 DelegateState delegate_state; | 236 DelegateState delegate_state; |
| 237 bool is_idle; | 237 bool is_idle; |
| 238 bool is_memory_reporting_enabled; | 238 bool is_memory_reporting_enabled; |
| 239 bool is_suspended; | 239 bool is_suspended; |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 private: | 242 private: |
| 243 friend class WebMediaPlayerImplTest; | 243 friend class WebMediaPlayerImplTest; |
| 244 friend class WebMediaPlayerImplBackgroundBehaviorTest; |
| 244 | 245 |
| 245 void EnableOverlay(); | 246 void EnableOverlay(); |
| 246 void DisableOverlay(); | 247 void DisableOverlay(); |
| 247 | 248 |
| 248 void OnPipelineSuspended(); | 249 void OnPipelineSuspended(); |
| 249 void OnBeforePipelineResume(); | 250 void OnBeforePipelineResume(); |
| 250 void OnPipelineResumed(); | 251 void OnPipelineResumed(); |
| 251 void OnDemuxerOpened(); | 252 void OnDemuxerOpened(); |
| 252 | 253 |
| 253 // Pipeline::Client overrides. | 254 // Pipeline::Client overrides. |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 | 697 |
| 697 // When this is true, pipeline will not be auto suspended. | 698 // When this is true, pipeline will not be auto suspended. |
| 698 bool disable_pipeline_auto_suspend_ = false; | 699 bool disable_pipeline_auto_suspend_ = false; |
| 699 | 700 |
| 700 // Pipeline statistics overridden by tests. | 701 // Pipeline statistics overridden by tests. |
| 701 base::Optional<PipelineStatistics> pipeline_statistics_for_test_; | 702 base::Optional<PipelineStatistics> pipeline_statistics_for_test_; |
| 702 | 703 |
| 703 // Pipeline media duration overridden by tests. | 704 // Pipeline media duration overridden by tests. |
| 704 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; | 705 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; |
| 705 | 706 |
| 707 // Whether the video requires a user gesture to resume after it was paused in |
| 708 // the background. Affects the value of ShouldPauseVideoWhenHidden(). |
| 709 bool video_locked_when_paused_when_hidden_ = false; |
| 710 |
| 706 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 711 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 707 }; | 712 }; |
| 708 | 713 |
| 709 } // namespace media | 714 } // namespace media |
| 710 | 715 |
| 711 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 716 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |