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

Unified Diff: content/shell/test_runner/web_test_interfaces.cc

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
« no previous file with comments | « content/shell/test_runner/web_test_interfaces.h ('k') | content/test/test_blink_web_unit_test_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/web_test_interfaces.cc
diff --git a/content/shell/test_runner/web_test_interfaces.cc b/content/shell/test_runner/web_test_interfaces.cc
index 637f497315531502ff3c1a93005ed289873caa48..d63c3d95902dde18ff912b7b44181110c1fc4919 100644
--- a/content/shell/test_runner/web_test_interfaces.cc
+++ b/content/shell/test_runner/web_test_interfaces.cc
@@ -18,6 +18,7 @@
#include "content/shell/test_runner/web_view_test_proxy.h"
#include "content/shell/test_runner/web_widget_test_client.h"
#include "content/shell/test_runner/web_widget_test_proxy.h"
+#include "third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h"
using namespace blink;
@@ -64,25 +65,27 @@ TestInterfaces* WebTestInterfaces::GetTestInterfaces() {
return interfaces_.get();
}
-WebMediaStreamCenter* WebTestInterfaces::CreateMediaStreamCenter(
- WebMediaStreamCenterClient* client) {
- return new MockWebMediaStreamCenter();
+std::unique_ptr<WebMediaStreamCenter>
+WebTestInterfaces::CreateMediaStreamCenter(WebMediaStreamCenterClient* client) {
+ return base::MakeUnique<MockWebMediaStreamCenter>();
}
-WebRTCPeerConnectionHandler*
+std::unique_ptr<WebRTCPeerConnectionHandler>
WebTestInterfaces::CreateWebRTCPeerConnectionHandler(
WebRTCPeerConnectionHandlerClient* client) {
- return new MockWebRTCPeerConnectionHandler(client, interfaces_.get());
+ return base::MakeUnique<MockWebRTCPeerConnectionHandler>(client,
+ interfaces_.get());
}
-WebMIDIAccessor* WebTestInterfaces::CreateMIDIAccessor(
+std::unique_ptr<WebMIDIAccessor> WebTestInterfaces::CreateMIDIAccessor(
WebMIDIAccessorClient* client) {
- return new MockWebMIDIAccessor(client, interfaces_.get());
+ return base::MakeUnique<MockWebMIDIAccessor>(client, interfaces_.get());
}
-WebAudioDevice* WebTestInterfaces::CreateAudioDevice(double sample_rate,
- int frames_per_buffer) {
- return new MockWebAudioDevice(sample_rate, frames_per_buffer);
+std::unique_ptr<WebAudioDevice> WebTestInterfaces::CreateAudioDevice(
+ double sample_rate,
+ int frames_per_buffer) {
+ return base::MakeUnique<MockWebAudioDevice>(sample_rate, frames_per_buffer);
}
std::unique_ptr<WebFrameTestClient> WebTestInterfaces::CreateWebFrameTestClient(
« no previous file with comments | « content/shell/test_runner/web_test_interfaces.h ('k') | content/test/test_blink_web_unit_test_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698