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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool supportsSave() const override; | 107 bool supportsSave() const override; |
108 void seek(double seconds) override; | 108 void seek(double seconds) override; |
109 void setRate(double rate) override; | 109 void setRate(double rate) override; |
110 void setVolume(double volume) override; | 110 void setVolume(double volume) override; |
111 void setSinkId(const blink::WebString& sink_id, | 111 void setSinkId(const blink::WebString& sink_id, |
112 const blink::WebSecurityOrigin& security_origin, | 112 const blink::WebSecurityOrigin& security_origin, |
113 blink::WebSetSinkIdCallbacks* web_callback) override; | 113 blink::WebSetSinkIdCallbacks* web_callback) override; |
114 void setPreload(blink::WebMediaPlayer::Preload preload) override; | 114 void setPreload(blink::WebMediaPlayer::Preload preload) override; |
115 void setBufferingStrategy( | 115 void setBufferingStrategy( |
116 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; | 116 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; |
| 117 void setPlaybackState( |
| 118 blink::WebMediaPlayer::PlaybackState playback_state) override; |
117 blink::WebTimeRanges buffered() const override; | 119 blink::WebTimeRanges buffered() const override; |
118 blink::WebTimeRanges seekable() const override; | 120 blink::WebTimeRanges seekable() const override; |
119 | 121 |
120 // paint() the current video frame into |canvas|. This is used to support | 122 // paint() the current video frame into |canvas|. This is used to support |
121 // various APIs and functionalities, including but not limited to: <canvas>, | 123 // various APIs and functionalities, including but not limited to: <canvas>, |
122 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. | 124 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. |
123 void paint(blink::WebCanvas* canvas, | 125 void paint(blink::WebCanvas* canvas, |
124 const blink::WebRect& rect, | 126 const blink::WebRect& rect, |
125 unsigned char alpha, | 127 unsigned char alpha, |
126 SkXfermode::Mode mode) override; | 128 SkXfermode::Mode mode) override; |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 CanSuspendState can_suspend_state_; | 536 CanSuspendState can_suspend_state_; |
535 | 537 |
536 // Called some-time after OnHidden() if the media was suspended in a playing | 538 // Called some-time after OnHidden() if the media was suspended in a playing |
537 // state as part of the call to OnHidden(). | 539 // state as part of the call to OnHidden(). |
538 base::OneShotTimer background_pause_timer_; | 540 base::OneShotTimer background_pause_timer_; |
539 | 541 |
540 // Monitors the watch time of the played content. | 542 // Monitors the watch time of the played content. |
541 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; | 543 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; |
542 bool is_encrypted_; | 544 bool is_encrypted_; |
543 | 545 |
| 546 // Reflects the playback state of the WebMediaPlayerClient. This will not |
| 547 // match |paused_| or |playback_rate_| when |highest_ready_state_| is less |
| 548 // than WebMediaPlayer::ReadyStateHaveFutureData. |
| 549 WebMediaPlayer::PlaybackState client_playback_state_; |
| 550 |
544 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 551 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
545 }; | 552 }; |
546 | 553 |
547 } // namespace media | 554 } // namespace media |
548 | 555 |
549 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 556 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |