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

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

Issue 220333003: Apply OwnPtr|PassOwnPtr to handle member variables and arguments in MIDIClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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: Source/modules/webmidi/MIDIController.cpp
diff --git a/Source/modules/webmidi/MIDIController.cpp b/Source/modules/webmidi/MIDIController.cpp
index 6d3ad053b4efcd8e54e34c016108a9b3cd17082c..2aa4b629001c28b2abba47b40e8d2653eb8ddd01 100644
--- a/Source/modules/webmidi/MIDIController.cpp
+++ b/Source/modules/webmidi/MIDIController.cpp
@@ -41,7 +41,7 @@ const char* MIDIController::supplementName()
return "MIDIController";
}
-MIDIController::MIDIController(MIDIClient* client)
+MIDIController::MIDIController(PassOwnPtr<MIDIClient> client)
: m_client(client)
{
ASSERT(client);
@@ -51,7 +51,7 @@ MIDIController::~MIDIController()
{
}
-PassOwnPtr<MIDIController> MIDIController::create(MIDIClient* client)
+PassOwnPtr<MIDIController> MIDIController::create(PassOwnPtr<MIDIClient> client)
{
return adoptPtr(new MIDIController(client));
}
@@ -66,7 +66,7 @@ void MIDIController::cancelSysexPermissionRequest(MIDIAccess* access)
m_client->cancelSysexPermissionRequest(access);
}
-void provideMIDITo(Page& page, MIDIClient* client)
+void provideMIDITo(Page& page, PassOwnPtr<MIDIClient> client)
{
MIDIController::provideTo(page, MIDIController::supplementName(), MIDIController::create(client));
}

Powered by Google App Engine
This is Rietveld 408576698