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

Side by Side Diff: media/midi/midi_scheduler.cc

Issue 1086073004: Web MIDI: namespace change from media to media::midi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@null
Patch Set: (rebase) Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « media/midi/midi_scheduler.h ('k') | media/midi/usb_midi_descriptor_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/midi/midi_scheduler.h" 5 #include "media/midi/midi_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/midi/midi_manager.h" 10 #include "media/midi/midi_manager.h"
11 11
12 namespace media { 12 namespace media {
13 namespace midi {
13 14
14 MidiScheduler::MidiScheduler(MidiManager* manager) 15 MidiScheduler::MidiScheduler(MidiManager* manager)
15 : manager_(manager), 16 : manager_(manager),
16 weak_factory_(this) { 17 weak_factory_(this) {
17 } 18 }
18 19
19 MidiScheduler::~MidiScheduler() { 20 MidiScheduler::~MidiScheduler() {
20 } 21 }
21 22
22 // TODO(crbug.com/467442): Use CancelableTaskTracker once it supports 23 // TODO(crbug.com/467442): Use CancelableTaskTracker once it supports
(...skipping 22 matching lines...) Expand all
45 FROM_HERE, weak_closure, delay); 46 FROM_HERE, weak_closure, delay);
46 } 47 }
47 48
48 void MidiScheduler::InvokeClosure(MidiManagerClient* client, 49 void MidiScheduler::InvokeClosure(MidiManagerClient* client,
49 size_t length, 50 size_t length,
50 const base::Closure& closure) { 51 const base::Closure& closure) {
51 closure.Run(); 52 closure.Run();
52 manager_->AccumulateMidiBytesSent(client, length); 53 manager_->AccumulateMidiBytesSent(client, length);
53 } 54 }
54 55
56 } // namespace midi
55 } // namespace media 57 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_scheduler.h ('k') | media/midi/usb_midi_descriptor_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698