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