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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIController.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/webmidi/MIDIController.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIController.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIController.cpp
index 3ae61d70f031bcacc2499bd899560958a972329f..8ea0a2105c9470684380ffa3c4fdf5f520ea7890 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIController.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIController.cpp
@@ -32,7 +32,6 @@
#include "modules/webmidi/MIDIAccessInitializer.h"
#include "modules/webmidi/MIDIClient.h"
-#include <memory>
namespace blink {
@@ -41,7 +40,7 @@ const char* MIDIController::supplementName()
return "MIDIController";
}
-MIDIController::MIDIController(std::unique_ptr<MIDIClient> client)
+MIDIController::MIDIController(PassOwnPtr<MIDIClient> client)
: m_client(std::move(client))
{
DCHECK(m_client);
@@ -51,7 +50,7 @@ MIDIController::~MIDIController()
{
}
-MIDIController* MIDIController::create(std::unique_ptr<MIDIClient> client)
+MIDIController* MIDIController::create(PassOwnPtr<MIDIClient> client)
{
return new MIDIController(std::move(client));
}
@@ -66,7 +65,7 @@ void MIDIController::cancelPermissionRequest(MIDIAccessInitializer* initializer)
m_client->cancelPermissionRequest(initializer);
}
-void provideMIDITo(LocalFrame& frame, std::unique_ptr<MIDIClient> client)
+void provideMIDITo(LocalFrame& frame, PassOwnPtr<MIDIClient> client)
{
MIDIController::provideTo(frame, MIDIController::supplementName(), MIDIController::create(std::move(client)));
}

Powered by Google App Engine
This is Rietveld 408576698