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

Side by Side Diff: media/midi/usb_midi_input_stream.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/usb_midi_input_stream.h ('k') | media/midi/usb_midi_input_stream_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/usb_midi_input_stream.h" 5 #include "media/midi/usb_midi_input_stream.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "media/midi/usb_midi_device.h" 12 #include "media/midi/usb_midi_device.h"
13 #include "media/midi/usb_midi_jack.h" 13 #include "media/midi/usb_midi_jack.h"
14 14
15 namespace media { 15 namespace media {
16 namespace midi {
16 17
17 UsbMidiInputStream::JackUniqueKey::JackUniqueKey(UsbMidiDevice* device, 18 UsbMidiInputStream::JackUniqueKey::JackUniqueKey(UsbMidiDevice* device,
18 int endpoint_number, 19 int endpoint_number,
19 int cable_number) 20 int cable_number)
20 : device(device), 21 : device(device),
21 endpoint_number(endpoint_number), 22 endpoint_number(endpoint_number),
22 cable_number(cable_number) {} 23 cable_number(cable_number) {}
23 24
24 bool UsbMidiInputStream::JackUniqueKey::operator==( 25 bool UsbMidiInputStream::JackUniqueKey::operator==(
25 const JackUniqueKey& that) const { 26 const JackUniqueKey& that) const {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return; 84 return;
84 } 85 }
85 std::map<JackUniqueKey, size_t>::const_iterator it = 86 std::map<JackUniqueKey, size_t>::const_iterator it =
86 jack_dictionary_.find(JackUniqueKey(device, 87 jack_dictionary_.find(JackUniqueKey(device,
87 endpoint_number, 88 endpoint_number,
88 cable_number)); 89 cable_number));
89 if (it != jack_dictionary_.end()) 90 if (it != jack_dictionary_.end())
90 delegate_->OnReceivedData(it->second, &packet[1], packet_size, time); 91 delegate_->OnReceivedData(it->second, &packet[1], packet_size, time);
91 } 92 }
92 93
94 } // namespace midi
93 } // namespace media 95 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/usb_midi_input_stream.h ('k') | media/midi/usb_midi_input_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698