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