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

Issue 2741713002: Web MIDI: implement TaskService (Closed)

Created:
3 years, 9 months ago by Takashi Toyoshima
Modified:
3 years, 6 months ago
Reviewers:
yhirano, tzik
CC:
chromium-reviews, feature-media-reviews_chromium.org, toyoshim+midi_chromium.org, pmalani_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Web MIDI: implement TaskService Current Web MIDI code base has platform specific implementation that provides graceful asynchronous task handling on Linux and Windows. It allows MidiManager to post member method to another threads safely even if the MidiManager instance can be destructed dynamically. To expand this functionalities to all platform, I will introduce a common infrastructure, TaskService, to be used on all platforms. BUG=672793 Review-Url: https://codereview.chromium.org/2741713002 Cr-Commit-Position: refs/heads/master@{#478982} Committed: https://chromium.googlesource.com/chromium/src/+/0492fc281b7eb603be6e7f3f00afb7d9802ef3d5

Patch Set 1 #

Patch Set 2 : task_service #

Patch Set 3 : unit tests #

Patch Set 4 : more tests #

Total comments: 9

Patch Set 5 : fix #

Total comments: 10

Patch Set 6 : review #21 #

Total comments: 1

Patch Set 7 : offline review: merge reply task to bound task #

Total comments: 2

Patch Set 8 : review #33 #

Total comments: 2

Patch Set 9 : review #35 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+581 lines, -2 lines) Patch
M media/midi/BUILD.gn View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M media/midi/midi_service.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M media/midi/midi_service.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
A media/midi/task_service.h View 1 2 3 4 5 6 7 8 1 chunk +96 lines, -0 lines 0 comments Download
A media/midi/task_service.cc View 1 2 3 4 5 6 7 8 1 chunk +156 lines, -0 lines 0 comments Download
A media/midi/task_service_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +311 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 42 (28 generated)
Takashi Toyoshima
cc: pmalani (fyi, this will be applied to alsa port) Yutaka, PTAL.
3 years, 6 months ago (2017-06-06 06:14:08 UTC) #10
yhirano
I don't know how the interface is used: If you have subsequent CLs which actually ...
3 years, 6 months ago (2017-06-07 09:21:03 UTC) #13
yhirano
On 2017/06/07 09:21:03, yhirano wrote: > I don't know how the interface is used: If ...
3 years, 6 months ago (2017-06-07 09:45:06 UTC) #14
yhirano
https://codereview.chromium.org/2741713002/diff/80001/media/midi/task_service.cc File media/midi/task_service.cc (right): https://codereview.chromium.org/2741713002/diff/80001/media/midi/task_service.cc#newcode128 media/midi/task_service.cc:128: if (instance_id != bound_instance_id_ && instance_id != kInvalidInstanceId) Is ...
3 years, 6 months ago (2017-06-07 10:24:26 UTC) #15
Takashi Toyoshima
https://codereview.chromium.org/2741713002/diff/80001/media/midi/midi_service.h File media/midi/midi_service.h (right): https://codereview.chromium.org/2741713002/diff/80001/media/midi/midi_service.h#newcode63 media/midi/midi_service.h:63: TaskService* task() { return task_service_.get(); } On 2017/06/07 09:21:03, ...
3 years, 6 months ago (2017-06-07 13:00:07 UTC) #16
yhirano
https://codereview.chromium.org/2741713002/diff/100001/media/midi/task_service.cc File media/midi/task_service.cc (right): https://codereview.chromium.org/2741713002/diff/100001/media/midi/task_service.cc#newcode50 media/midi/task_service.cc:50: // Now RunTask never run any posted task. But ...
3 years, 6 months ago (2017-06-08 09:03:38 UTC) #21
Takashi Toyoshima
https://codereview.chromium.org/2741713002/diff/100001/media/midi/task_service.cc File media/midi/task_service.cc (right): https://codereview.chromium.org/2741713002/diff/100001/media/midi/task_service.cc#newcode50 media/midi/task_service.cc:50: // Now RunTask never run any posted task. But ...
3 years, 6 months ago (2017-06-08 10:30:12 UTC) #23
Takashi Toyoshima
ptal. ps7 reflect yhirano's offline comment.
3 years, 6 months ago (2017-06-09 06:11:06 UTC) #30
yhirano
https://codereview.chromium.org/2741713002/diff/140001/media/midi/task_service.cc File media/midi/task_service.cc (right): https://codereview.chromium.org/2741713002/diff/140001/media/midi/task_service.cc#newcode111 media/midi/task_service.cc:111: DCHECK_EQ(threads_.size() + 1u, thread_task_locks_.size()); You don't need this "+1". ...
3 years, 6 months ago (2017-06-12 07:54:45 UTC) #33
Takashi Toyoshima
https://codereview.chromium.org/2741713002/diff/140001/media/midi/task_service.cc File media/midi/task_service.cc (right): https://codereview.chromium.org/2741713002/diff/140001/media/midi/task_service.cc#newcode111 media/midi/task_service.cc:111: DCHECK_EQ(threads_.size() + 1u, thread_task_locks_.size()); sounds a nice idea to ...
3 years, 6 months ago (2017-06-13 06:29:41 UTC) #34
yhirano
lgtm https://codereview.chromium.org/2741713002/diff/160001/media/midi/task_service.h File media/midi/task_service.h (right): https://codereview.chromium.org/2741713002/diff/160001/media/midi/task_service.h#newcode67 media/midi/task_service.h:67: scoped_refptr<base::SingleThreadTaskRunner> reply_task_runner_; [optional] PostReplyTask is gone, so it ...
3 years, 6 months ago (2017-06-13 09:30:47 UTC) #35
Takashi Toyoshima
https://codereview.chromium.org/2741713002/diff/160001/media/midi/task_service.h File media/midi/task_service.h (right): https://codereview.chromium.org/2741713002/diff/160001/media/midi/task_service.h#newcode67 media/midi/task_service.h:67: scoped_refptr<base::SingleThreadTaskRunner> reply_task_runner_; On 2017/06/13 09:30:47, yhirano wrote: > [optional] ...
3 years, 6 months ago (2017-06-13 10:06:47 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2741713002/180001
3 years, 6 months ago (2017-06-13 10:07:30 UTC) #39
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 12:32:01 UTC) #42
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/0492fc281b7eb603be6e7f3f00af...

Powered by Google App Engine
This is Rietveld 408576698