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

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: Fix a unit test #2 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
« no previous file with comments | « Source/modules/webmidi/MIDIController.h ('k') | Source/web/MIDIClientProxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIController.cpp
diff --git a/Source/modules/webmidi/MIDIController.cpp b/Source/modules/webmidi/MIDIController.cpp
index 6d3ad053b4efcd8e54e34c016108a9b3cd17082c..55cc3996ea63a69c1e082512a75064b7080a9a51 100644
--- a/Source/modules/webmidi/MIDIController.cpp
+++ b/Source/modules/webmidi/MIDIController.cpp
@@ -41,17 +41,17 @@ const char* MIDIController::supplementName()
return "MIDIController";
}
-MIDIController::MIDIController(MIDIClient* client)
+MIDIController::MIDIController(PassOwnPtr<MIDIClient> client)
: m_client(client)
{
- ASSERT(client);
+ ASSERT(m_client);
gyuyoung-inactive 2014/04/03 06:30:11 I missed that client becomes a null after passing
}
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));
}
« no previous file with comments | « Source/modules/webmidi/MIDIController.h ('k') | Source/web/MIDIClientProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698