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

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

Issue 16025005: Web MIDI API back-end (work-in-progress) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/midi/midi_manager.h"
6
7 namespace media {
8
9 MIDIManager::MIDIManager() {}
10 MIDIManager::~MIDIManager() {}
11
12 void MIDIManager::AddClient(Client* client) {
13 base::AutoLock auto_lock(clients_lock_);
14 clients_.insert(client);
15 };
16
17 void MIDIManager::RemoveClient(Client* client) {
18 base::AutoLock auto_lock(clients_lock_);
19 ClientList::iterator i = clients_.find(client);
20 clients_.erase(i);
21 };
22
23 void MIDIManager::ReceiveMIDIData(
24 int port_index,
25 const uint8* data,
26 size_t length,
27 double time_stamp) {
28 base::AutoLock auto_lock(clients_lock_);
29 for (ClientList::iterator i = clients_.begin(); i != clients_.end(); ++i)
30 (*i)->ReceiveMIDIData(port_index, data, length, time_stamp);
31 };
32
33 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698