Index: third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp |
index 9389f7f20b2fd1c824e7c1164629dd3da8eb1df3..cf0a3c82e149cf3cff1a0fe6e4efc64e7ec6c840 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp |
@@ -7,6 +7,7 @@ |
#include "core/dom/Document.h" |
#include "core/testing/DummyPageHolder.h" |
#include "platform/testing/TestingPlatformSupport.h" |
+#include "platform/wtf/PtrUtil.h" |
#include "public/platform/WebAudioDevice.h" |
#include "public/platform/WebAudioLatencyHint.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -33,12 +34,13 @@ class MockWebAudioDevice : public WebAudioDevice { |
class AudioContextTestPlatform : public TestingPlatformSupport { |
public: |
- WebAudioDevice* CreateAudioDevice(unsigned number_of_input_channels, |
- unsigned number_of_channels, |
- const WebAudioLatencyHint& latency_hint, |
- WebAudioDevice::RenderCallback*, |
- const WebString& device_id, |
- const WebSecurityOrigin&) override { |
+ std::unique_ptr<WebAudioDevice> CreateAudioDevice( |
+ unsigned number_of_input_channels, |
+ unsigned number_of_channels, |
+ const WebAudioLatencyHint& latency_hint, |
+ WebAudioDevice::RenderCallback*, |
+ const WebString& device_id, |
+ const WebSecurityOrigin&) override { |
double buffer_size = 0; |
const double interactive_size = AudioHardwareBufferSize(); |
const double balanced_size = AudioHardwareBufferSize() * 2; |
@@ -64,7 +66,8 @@ class AudioContextTestPlatform : public TestingPlatformSupport { |
break; |
} |
- return new MockWebAudioDevice(AudioHardwareSampleRate(), buffer_size); |
+ return WTF::MakeUnique<MockWebAudioDevice>(AudioHardwareSampleRate(), |
+ buffer_size); |
} |
double AudioHardwareSampleRate() override { return 44100; } |