Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp |
index 36cf2a307db696d723863b8c89bca8743adaed00..9d2c897ab6c697a4c4549a12a46050488b94e018 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp |
@@ -18,6 +18,7 @@ |
#include "platform/UserGestureIndicator.h" |
#include "platform/testing/HistogramTester.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" |
@@ -66,14 +67,15 @@ class MockWebAudioDevice : public WebAudioDevice { |
class BaseAudioContextTestPlatform : 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 { |
- return new MockWebAudioDevice(AudioHardwareSampleRate(), |
- AudioHardwareBufferSize()); |
+ 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 { |
+ return WTF::MakeUnique<MockWebAudioDevice>(AudioHardwareSampleRate(), |
+ AudioHardwareBufferSize()); |
} |
double AudioHardwareSampleRate() override { return 44100; } |