Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Unified Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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; }

Powered by Google App Engine
This is Rietveld 408576698