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

Issue 311773003: Decouple MIDIAccess initialization from MIDIAccess class. (Closed)

Created:
6 years, 6 months ago by yhirano
Modified:
6 years, 6 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175952

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 15

Patch Set 4 : rebase #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -208 lines) Patch
M Source/modules/modules.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/webmidi/MIDIAccess.h View 1 2 3 4 4 chunks +14 lines, -21 lines 0 comments Download
M Source/modules/webmidi/MIDIAccess.cpp View 1 2 3 4 5 4 chunks +36 lines, -119 lines 0 comments Download
A Source/modules/webmidi/MIDIAccessInitializer.h View 1 chunk +69 lines, -0 lines 0 comments Download
A Source/modules/webmidi/MIDIAccessInitializer.cpp View 1 2 3 4 5 1 chunk +143 lines, -0 lines 0 comments Download
M Source/modules/webmidi/MIDIAccessor.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/modules/webmidi/MIDIClient.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/webmidi/MIDIClientMock.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/webmidi/MIDIClientMock.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M Source/modules/webmidi/MIDIController.h View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M Source/modules/webmidi/MIDIController.cpp View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M Source/web/MIDIClientProxy.h View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/web/MIDIClientProxy.cpp View 2 chunks +6 lines, -8 lines 0 comments Download
M Source/web/WebMIDIClientMock.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/web/WebMIDIPermissionRequest.cpp View 1 2 1 chunk +6 lines, -19 lines 0 comments Download
M public/web/WebMIDIClient.h View 1 2 3 4 5 1 chunk +11 lines, -4 lines 0 comments Download
M public/web/WebMIDIPermissionRequest.h View 1 2 3 4 1 chunk +11 lines, -15 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
yhirano
6 years, 6 months ago (2014-06-04 02:05:00 UTC) #1
yhirano
This CL doesn't change the behavior. This CL is a preparation CL for introducing AsyncInitializerResolver ...
6 years, 6 months ago (2014-06-04 02:06:05 UTC) #2
Takashi Toyoshima
looking in terms of Web MIDI. Also add kouhei@ for pointers since my understanding on ...
6 years, 6 months ago (2014-06-04 20:52:35 UTC) #3
Takashi Toyoshima
https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h File Source/modules/webmidi/MIDIAccess.h (right): https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h#newcode80 Source/modules/webmidi/MIDIAccess.h:80: virtual void didAddOutputPort(const String& id, const String& manufacturer, const ...
6 years, 6 months ago (2014-06-04 22:03:53 UTC) #4
kouhei (in TOK)
https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h File Source/modules/webmidi/MIDIAccess.h (right): https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h#newcode80 Source/modules/webmidi/MIDIAccess.h:80: virtual void didAddOutputPort(const String& id, const String& manufacturer, const ...
6 years, 6 months ago (2014-06-05 01:19:44 UTC) #5
yhirano
Updated issue description. https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h File Source/modules/webmidi/MIDIAccess.h (right): https://codereview.chromium.org/311773003/diff/40001/Source/modules/webmidi/MIDIAccess.h#newcode80 Source/modules/webmidi/MIDIAccess.h:80: virtual void didAddOutputPort(const String& id, const ...
6 years, 6 months ago (2014-06-05 11:35:25 UTC) #6
Takashi Toyoshima
lgtm.
6 years, 6 months ago (2014-06-09 05:31:57 UTC) #7
yhirano
kouhei, do you have any other comments?
6 years, 6 months ago (2014-06-10 02:29:27 UTC) #8
kouhei (in TOK)
On 2014/06/10 02:29:27, yhirano wrote: > kouhei, do you have any other comments? lgtm
6 years, 6 months ago (2014-06-10 03:43:32 UTC) #9
yhirano
+tkent for Source/web and public/web
6 years, 6 months ago (2014-06-10 03:52:00 UTC) #10
tkent
https://codereview.chromium.org/311773003/diff/40001/public/web/WebMIDIPermissionRequest.h File public/web/WebMIDIPermissionRequest.h (right): https://codereview.chromium.org/311773003/diff/40001/public/web/WebMIDIPermissionRequest.h#newcode65 public/web/WebMIDIPermissionRequest.h:65: WebCore::MIDIAccessInitializer* m_initializer; On 2014/06/05 11:35:25, yhirano wrote: > On ...
6 years, 6 months ago (2014-06-10 04:28:32 UTC) #11
yhirano
On 2014/06/10 04:28:32, tkent wrote: > https://codereview.chromium.org/311773003/diff/40001/public/web/WebMIDIPermissionRequest.h > File public/web/WebMIDIPermissionRequest.h (right): > > https://codereview.chromium.org/311773003/diff/40001/public/web/WebMIDIPermissionRequest.h#newcode65 > ...
6 years, 6 months ago (2014-06-10 07:20:27 UTC) #12
tkent
On 2014/06/10 07:20:27, yhirano wrote: > A WebMIDIClient is responsible for not accessing cancelled requests. ...
6 years, 6 months ago (2014-06-10 07:40:33 UTC) #13
yhirano
> As a public API, this rule must be documented in a code comment. The ...
6 years, 6 months ago (2014-06-10 08:17:07 UTC) #14
tkent
lgtm
6 years, 6 months ago (2014-06-10 08:33:32 UTC) #15
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-11 08:44:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311773003/100001
6 years, 6 months ago (2014-06-11 08:44:35 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 08:44:45 UTC) #18
commit-bot: I haz the power
Failed to apply patch for Source/modules/webmidi/MIDIController.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 6 months ago (2014-06-11 08:44:46 UTC) #19
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-11 08:54:29 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311773003/120001
6 years, 6 months ago (2014-06-11 08:54:42 UTC) #21
commit-bot: I haz the power
6 years, 6 months ago (2014-06-11 10:02:13 UTC) #22
Message was sent while issue was closed.
Change committed as 175952

Powered by Google App Engine
This is Rietveld 408576698