| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 // Return the pipeline media duration or the value overridden by tests. | 451 // Return the pipeline media duration or the value overridden by tests. |
| 452 base::TimeDelta GetPipelineMediaDuration() const; | 452 base::TimeDelta GetPipelineMediaDuration() const; |
| 453 | 453 |
| 454 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, | 454 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, |
| 455 base::TimeTicks new_frame_time); | 455 base::TimeTicks new_frame_time); |
| 456 | 456 |
| 457 // Records |duration| to the appropriate metric based on whether we're | 457 // Records |duration| to the appropriate metric based on whether we're |
| 458 // handling a src= or MSE based playback. | 458 // handling a src= or MSE based playback. |
| 459 void RecordUnderflowDuration(base::TimeDelta duration); | 459 void RecordUnderflowDuration(base::TimeDelta duration); |
| 460 | 460 |
| 461 // Records |natural_size| to MediaLog and video height to UMA. |
| 462 void RecordVideoNaturalSize(const gfx::Size& natural_size); |
| 463 |
| 461 blink::WebLocalFrame* frame_; | 464 blink::WebLocalFrame* frame_; |
| 462 | 465 |
| 463 // The playback state last reported to |delegate_|, to avoid setting duplicate | 466 // The playback state last reported to |delegate_|, to avoid setting duplicate |
| 464 // states. | 467 // states. |
| 465 // TODO(sandersd): The delegate should be implementing deduplication. | 468 // TODO(sandersd): The delegate should be implementing deduplication. |
| 466 DelegateState delegate_state_; | 469 DelegateState delegate_state_; |
| 467 bool delegate_has_audio_; | 470 bool delegate_has_audio_; |
| 468 | 471 |
| 469 blink::WebMediaPlayer::NetworkState network_state_; | 472 blink::WebMediaPlayer::NetworkState network_state_; |
| 470 blink::WebMediaPlayer::ReadyState ready_state_; | 473 blink::WebMediaPlayer::ReadyState ready_state_; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 bool video_locked_when_paused_when_hidden_ = false; | 717 bool video_locked_when_paused_when_hidden_ = false; |
| 715 | 718 |
| 716 // Whether embedded media experience is currently enabled. | 719 // Whether embedded media experience is currently enabled. |
| 717 bool embedded_media_experience_enabled_ = false; | 720 bool embedded_media_experience_enabled_ = false; |
| 718 | 721 |
| 719 gfx::Size last_uploaded_frame_size_; | 722 gfx::Size last_uploaded_frame_size_; |
| 720 base::TimeDelta last_uploaded_frame_timestamp_; | 723 base::TimeDelta last_uploaded_frame_timestamp_; |
| 721 | 724 |
| 722 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_; | 725 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_; |
| 723 | 726 |
| 727 bool initial_video_height_recorded_ = false; |
| 728 |
| 724 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 729 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 725 }; | 730 }; |
| 726 | 731 |
| 727 } // namespace media | 732 } // namespace media |
| 728 | 733 |
| 729 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 734 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |