| 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 <string> | 10 #include <string> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 blink::WebAudioSourceProvider* audioSourceProvider() override; | 161 blink::WebAudioSourceProvider* audioSourceProvider() override; |
| 162 | 162 |
| 163 void setContentDecryptionModule( | 163 void setContentDecryptionModule( |
| 164 blink::WebContentDecryptionModule* cdm, | 164 blink::WebContentDecryptionModule* cdm, |
| 165 blink::WebContentDecryptionModuleResult result) override; | 165 blink::WebContentDecryptionModuleResult result) override; |
| 166 | 166 |
| 167 void enteredFullscreen() override; | 167 void enteredFullscreen() override; |
| 168 void exitedFullscreen() override; | 168 void exitedFullscreen() override; |
| 169 | 169 |
| 170 // WebMediaPlayerDelegate::Observer implementation. | 170 // WebMediaPlayerDelegate::Observer implementation. |
| 171 void OnHidden(bool must_suspend) override; | 171 void OnHidden() override; |
| 172 void OnShown() override; | 172 void OnShown() override; |
| 173 void OnSuspendRequested(bool must_suspend) override; |
| 173 void OnPlay() override; | 174 void OnPlay() override; |
| 174 void OnPause() override; | 175 void OnPause() override; |
| 175 void OnVolumeMultiplierUpdate(double multiplier) override; | 176 void OnVolumeMultiplierUpdate(double multiplier) override; |
| 176 | 177 |
| 177 #if defined(OS_ANDROID) // WMPI_CAST | 178 #if defined(OS_ANDROID) // WMPI_CAST |
| 178 bool isRemote() const override; | 179 bool isRemote() const override; |
| 179 void requestRemotePlayback() override; | 180 void requestRemotePlayback() override; |
| 180 void requestRemotePlaybackControl() override; | 181 void requestRemotePlaybackControl() override; |
| 181 | 182 |
| 182 void SetMediaPlayerManager( | 183 void SetMediaPlayerManager( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void NotifyPlaybackStarted(); | 279 void NotifyPlaybackStarted(); |
| 279 void NotifyPlaybackPaused(); | 280 void NotifyPlaybackPaused(); |
| 280 | 281 |
| 281 // Called at low frequency to tell external observers how much memory we're | 282 // Called at low frequency to tell external observers how much memory we're |
| 282 // using for video playback. Called by |memory_usage_reporting_timer_|. | 283 // using for video playback. Called by |memory_usage_reporting_timer_|. |
| 283 // Memory usage reporting is done in two steps, because |demuxer_| must be | 284 // Memory usage reporting is done in two steps, because |demuxer_| must be |
| 284 // accessed on the media thread. | 285 // accessed on the media thread. |
| 285 void ReportMemoryUsage(); | 286 void ReportMemoryUsage(); |
| 286 void FinishMemoryUsageReport(int64_t demuxer_memory_usage); | 287 void FinishMemoryUsageReport(int64_t demuxer_memory_usage); |
| 287 | 288 |
| 289 // Indicates if automatic resumption of a suspended playback is allowed. |
| 290 bool IsAutomaticResumeAllowed(); |
| 291 |
| 288 blink::WebLocalFrame* frame_; | 292 blink::WebLocalFrame* frame_; |
| 289 | 293 |
| 290 // TODO(hclam): get rid of these members and read from the pipeline directly. | 294 // TODO(hclam): get rid of these members and read from the pipeline directly. |
| 291 blink::WebMediaPlayer::NetworkState network_state_; | 295 blink::WebMediaPlayer::NetworkState network_state_; |
| 292 blink::WebMediaPlayer::ReadyState ready_state_; | 296 blink::WebMediaPlayer::ReadyState ready_state_; |
| 293 | 297 |
| 294 // Preload state for when |data_source_| is created after setPreload(). | 298 // Preload state for when |data_source_| is created after setPreload(). |
| 295 BufferedDataSource::Preload preload_; | 299 BufferedDataSource::Preload preload_; |
| 296 | 300 |
| 297 // Buffering strategy for when |data_source_| is created after | 301 // Buffering strategy for when |data_source_| is created after |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // started; prevents us from spuriously logging errors that are transient or | 439 // started; prevents us from spuriously logging errors that are transient or |
| 436 // unimportant. | 440 // unimportant. |
| 437 bool suppress_destruction_errors_; | 441 bool suppress_destruction_errors_; |
| 438 | 442 |
| 439 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 443 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 440 }; | 444 }; |
| 441 | 445 |
| 442 } // namespace media | 446 } // namespace media |
| 443 | 447 |
| 444 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 448 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |