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

Side by Side Diff: media/midi/usb_midi_descriptor_parser.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
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_descriptor_parser.h" 5 #include "media/midi/usb_midi_descriptor_parser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 11
12 namespace media { 12 namespace media {
13 namespace midi {
13 14
14 namespace { 15 namespace {
15 16
16 // The constants below are specified in USB spec, USB audio spec 17 // The constants below are specified in USB spec, USB audio spec
17 // and USB midi spec. 18 // and USB midi spec.
18 19
19 enum DescriptorType { 20 enum DescriptorType {
20 TYPE_DEVICE = 1, 21 TYPE_DEVICE = 1,
21 TYPE_CONFIGURATION = 2, 22 TYPE_CONFIGURATION = 2,
22 TYPE_STRING = 3, 23 TYPE_STRING = 3,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return true; 279 return true;
279 } 280 }
280 281
281 void UsbMidiDescriptorParser::Clear() { 282 void UsbMidiDescriptorParser::Clear() {
282 is_parsing_usb_midi_interface_ = false; 283 is_parsing_usb_midi_interface_ = false;
283 current_endpoint_address_ = 0; 284 current_endpoint_address_ = 0;
284 current_cable_number_ = 0; 285 current_cable_number_ = 0;
285 incomplete_jacks_.clear(); 286 incomplete_jacks_.clear();
286 } 287 }
287 288
289 } // namespace midi
288 } // namespace media 290 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/usb_midi_descriptor_parser.h ('k') | media/midi/usb_midi_descriptor_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698