| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 web_local_frame_, &client_, nullptr, &delegate_, | 202 web_local_frame_, &client_, nullptr, &delegate_, |
| 203 base::MakeUnique<DefaultRendererFactory>( | 203 base::MakeUnique<DefaultRendererFactory>( |
| 204 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB()), | 204 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB()), |
| 205 url_index_, | 205 url_index_, |
| 206 WebMediaPlayerParams( | 206 WebMediaPlayerParams( |
| 207 WebMediaPlayerParams::DeferLoadCB(), | 207 WebMediaPlayerParams::DeferLoadCB(), |
| 208 scoped_refptr<SwitchableAudioRendererSink>(), media_log_, | 208 scoped_refptr<SwitchableAudioRendererSink>(), media_log_, |
| 209 media_thread_.task_runner(), message_loop_.task_runner(), | 209 media_thread_.task_runner(), message_loop_.task_runner(), |
| 210 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), | 210 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), |
| 211 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr, | 211 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr, |
| 212 base::TimeDelta::FromSeconds(10), allow_suspend)); | 212 base::TimeDelta::FromSeconds(10), false, allow_suspend)); |
| 213 } | 213 } |
| 214 | 214 |
| 215 ~WebMediaPlayerImplTest() override { | 215 ~WebMediaPlayerImplTest() override { |
| 216 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that | 216 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that |
| 217 // objects passed to the message loop for destruction are released. | 217 // objects passed to the message loop for destruction are released. |
| 218 // | 218 // |
| 219 // NOTE: This should be done before any other member variables are | 219 // NOTE: This should be done before any other member variables are |
| 220 // destructed since WMPI may reference them during destruction. | 220 // destructed since WMPI may reference them during destruction. |
| 221 wmpi_.reset(); | 221 wmpi_.reset(); |
| 222 base::RunLoop().RunUntilIdle(); | 222 base::RunLoop().RunUntilIdle(); |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 781 |
| 782 // Average keyframe distance is too big. | 782 // Average keyframe distance is too big. |
| 783 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100)); | 783 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100)); |
| 784 SetDuration(base::TimeDelta::FromSeconds(300)); | 784 SetDuration(base::TimeDelta::FromSeconds(300)); |
| 785 EXPECT_FALSE(IsBackgroundOptimizationCandidate()); | 785 EXPECT_FALSE(IsBackgroundOptimizationCandidate()); |
| 786 EXPECT_FALSE(ShouldPauseVideoWhenHidden()); | 786 EXPECT_FALSE(ShouldPauseVideoWhenHidden()); |
| 787 EXPECT_FALSE(ShouldDisableVideoWhenHidden()); | 787 EXPECT_FALSE(ShouldDisableVideoWhenHidden()); |
| 788 } | 788 } |
| 789 | 789 |
| 790 } // namespace media | 790 } // namespace media |
| OLD | NEW |