Decouple MIDIAccess initialization from MIDIAccess class.
Introduce a new class MIDIAccessInitializer which initializes MIDIAccess. Previously the initialization code were on MIDIAccess itself, but this CL decouples it. This CL changes the various initialization-related resource ownerships. In this CL MIDIAccessInitializer owns all initialization related resources and when the initialization is done (no matter whether successfull or not) it releases such resources. Unfortunately MIDIAccess owns MIDIAccessInitializer in this CL because there is no other natural owner of MIDIAccessInitializer. Hopefully MIDIAccess will stop owning MIDIAccessInitializer when [1] lands. 1. https://codereview.chromium.org/311733004/ BUG=361041 Review URL: https://codereview.chromium.org/311773003 git-svn-id: svn://svn.chromium.org/blink/trunk@175952 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment