| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 } | 247 } |
| 248 | 248 |
| 249 protected: | 249 protected: |
| 250 void SetReadyState(blink::WebMediaPlayer::ReadyState state) { | 250 void SetReadyState(blink::WebMediaPlayer::ReadyState state) { |
| 251 wmpi_->SetReadyState(state); | 251 wmpi_->SetReadyState(state); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; } | 254 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; } |
| 255 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; } | 255 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; } |
| 256 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; } | 256 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; } |
| 257 void SetTickClock(base::TickClock* clock) { wmpi_->tick_clock_.reset(clock); } | 257 void SetTickClock(base::TickClock* clock) { |
| 258 wmpi_->SetTickClockForTest(clock); |
| 259 } |
| 258 | 260 |
| 259 void SetFullscreen(bool is_fullscreen) { | 261 void SetFullscreen(bool is_fullscreen) { |
| 260 wmpi_->overlay_enabled_ = is_fullscreen; | 262 wmpi_->overlay_enabled_ = is_fullscreen; |
| 261 } | 263 } |
| 262 | 264 |
| 263 void SetMetadata(bool has_audio, bool has_video) { | 265 void SetMetadata(bool has_audio, bool has_video) { |
| 264 wmpi_->SetNetworkState(blink::WebMediaPlayer::kNetworkStateLoaded); | 266 wmpi_->SetNetworkState(blink::WebMediaPlayer::kNetworkStateLoaded); |
| 265 wmpi_->SetReadyState(blink::WebMediaPlayer::kReadyStateHaveMetadata); | 267 wmpi_->SetReadyState(blink::WebMediaPlayer::kReadyStateHaveMetadata); |
| 266 wmpi_->pipeline_metadata_.has_audio = has_audio; | 268 wmpi_->pipeline_metadata_.has_audio = has_audio; |
| 267 wmpi_->pipeline_metadata_.has_video = has_video; | 269 wmpi_->pipeline_metadata_.has_video = has_video; |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 WebMediaPlayerImplBackgroundBehaviorTest, | 988 WebMediaPlayerImplBackgroundBehaviorTest, |
| 987 ::testing::Combine(::testing::Bool(), | 989 ::testing::Combine(::testing::Bool(), |
| 988 ::testing::Bool(), | 990 ::testing::Bool(), |
| 989 ::testing::Values(5, 300), | 991 ::testing::Values(5, 300), |
| 990 ::testing::Values(5, 100), | 992 ::testing::Values(5, 100), |
| 991 ::testing::Bool(), | 993 ::testing::Bool(), |
| 992 ::testing::Bool(), | 994 ::testing::Bool(), |
| 993 ::testing::Bool())); | 995 ::testing::Bool())); |
| 994 | 996 |
| 995 } // namespace media | 997 } // namespace media |
| OLD | NEW |