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

Unified Diff: media/midi/midi_scheduler.h

Issue 1060553003: Web MIDI: call AccumulateMidiBytesSent() after operation finished (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 8 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 | « media/midi/midi_manager_usb_unittest.cc ('k') | media/midi/midi_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_scheduler.h
diff --git a/media/midi/midi_scheduler.h b/media/midi/midi_scheduler.h
index 3cb84334a76998823ea333b2de4f2767035159d5..06f6b5746d01373321a0fd833d45abb21cc374d9 100644
--- a/media/midi/midi_scheduler.h
+++ b/media/midi/midi_scheduler.h
@@ -10,12 +10,13 @@
namespace media {
+class MidiManager;
class MidiManagerClient;
// TODO(crbug.com/467442): Make tasks cancelable per client.
class MidiScheduler final {
public:
- MidiScheduler();
+ MidiScheduler(MidiManager* manager);
~MidiScheduler();
// Post |closure| to the current message loop safely. The |closure| will not
@@ -27,8 +28,12 @@ class MidiScheduler final {
const base::Closure& closure);
private:
- void InvokeClosure(const base::Closure& closure);
+ void InvokeClosure(MidiManagerClient* client,
+ size_t length,
+ const base::Closure& closure);
+ // MidiManager should own the MidiScheduler and be alive longer.
+ MidiManager* manager_;
base::WeakPtrFactory<MidiScheduler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MidiScheduler);
« no previous file with comments | « media/midi/midi_manager_usb_unittest.cc ('k') | media/midi/midi_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698