| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 wmpi_.reset(new WebMediaPlayerImpl( | 99 wmpi_.reset(new WebMediaPlayerImpl( |
| 100 web_local_frame_, &client_, nullptr, | 100 web_local_frame_, &client_, nullptr, |
| 101 base::WeakPtr<WebMediaPlayerDelegate>(), | 101 base::WeakPtr<WebMediaPlayerDelegate>(), |
| 102 make_scoped_ptr(new DefaultRendererFactory( | 102 make_scoped_ptr(new DefaultRendererFactory( |
| 103 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB(), | 103 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB(), |
| 104 audio_hardware_config_)), | 104 audio_hardware_config_)), |
| 105 url_index_, | 105 url_index_, |
| 106 WebMediaPlayerParams( | 106 WebMediaPlayerParams( |
| 107 WebMediaPlayerParams::DeferLoadCB(), | 107 WebMediaPlayerParams::DeferLoadCB(), |
| 108 scoped_refptr<RestartableAudioRendererSink>(), media_log_, | 108 scoped_refptr<SwitchableAudioRendererSink>(), media_log_, |
| 109 media_thread_.task_runner(), message_loop_.task_runner(), | 109 media_thread_.task_runner(), message_loop_.task_runner(), |
| 110 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), | 110 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), |
| 111 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr))); | 111 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr))); |
| 112 } | 112 } |
| 113 | 113 |
| 114 ~WebMediaPlayerImplTest() override { | 114 ~WebMediaPlayerImplTest() override { |
| 115 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that | 115 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that |
| 116 // objects passed to the message loop for destruction are released. | 116 // objects passed to the message loop for destruction are released. |
| 117 // | 117 // |
| 118 // NOTE: This should be done before any other member variables are | 118 // NOTE: This should be done before any other member variables are |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // The WebMediaPlayerImpl instance under test. | 151 // The WebMediaPlayerImpl instance under test. |
| 152 scoped_ptr<WebMediaPlayerImpl> wmpi_; | 152 scoped_ptr<WebMediaPlayerImpl> wmpi_; |
| 153 | 153 |
| 154 private: | 154 private: |
| 155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplTest); | 155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplTest); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 TEST_F(WebMediaPlayerImplTest, ConstructAndDestroy) {} | 158 TEST_F(WebMediaPlayerImplTest, ConstructAndDestroy) {} |
| 159 | 159 |
| 160 } // namespace media | 160 } // namespace media |
| OLD | NEW |