| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // accessed on the media thread. | 350 // accessed on the media thread. |
| 351 void ReportMemoryUsage(); | 351 void ReportMemoryUsage(); |
| 352 void FinishMemoryUsageReport(int64_t demuxer_memory_usage); | 352 void FinishMemoryUsageReport(int64_t demuxer_memory_usage); |
| 353 | 353 |
| 354 // Called during OnHidden() when we want a suspended player to enter the | 354 // Called during OnHidden() when we want a suspended player to enter the |
| 355 // paused state after some idle timeout. | 355 // paused state after some idle timeout. |
| 356 void ScheduleIdlePauseTimer(); | 356 void ScheduleIdlePauseTimer(); |
| 357 | 357 |
| 358 void CreateWatchTimeReporter(); | 358 void CreateWatchTimeReporter(); |
| 359 | 359 |
| 360 // Returns true if the player is hidden. |
| 361 bool IsHidden() const; |
| 362 |
| 360 blink::WebLocalFrame* frame_; | 363 blink::WebLocalFrame* frame_; |
| 361 | 364 |
| 362 // The playback state last reported to |delegate_|, to avoid setting duplicate | 365 // The playback state last reported to |delegate_|, to avoid setting duplicate |
| 363 // states. (Which can have undesired effects like resetting the idle timer.) | 366 // states. (Which can have undesired effects like resetting the idle timer.) |
| 364 DelegateState delegate_state_; | 367 DelegateState delegate_state_; |
| 365 | 368 |
| 366 // Set when OnSuspendRequested() is called with |must_suspend| unset. | 369 // Set when OnSuspendRequested() is called with |must_suspend| unset. |
| 367 bool is_idle_; | 370 bool is_idle_; |
| 368 | 371 |
| 369 // Set when OnSuspendRequested() is called with |must_suspend| set. | 372 // Set when OnSuspendRequested() is called with |must_suspend| set. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 | 578 |
| 576 // Whether the player is currently in autoplay muted state. | 579 // Whether the player is currently in autoplay muted state. |
| 577 bool autoplay_muted_ = false; | 580 bool autoplay_muted_ = false; |
| 578 | 581 |
| 579 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 582 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 580 }; | 583 }; |
| 581 | 584 |
| 582 } // namespace media | 585 } // namespace media |
| 583 | 586 |
| 584 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 587 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |