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

Side by Side Diff: media/midi/midi_manager_win.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_manager_win.h ('k') | media/midi/midi_message_queue.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_manager_win.h" 5 #include "media/midi/midi_manager_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <ks.h> 8 #include <ks.h>
9 #include <ksmedia.h> 9 #include <ksmedia.h>
10 #include <mmreg.h> 10 #include <mmreg.h>
(...skipping 29 matching lines...) Expand all
40 #include "base/threading/thread_checker.h" 40 #include "base/threading/thread_checker.h"
41 #include "base/timer/timer.h" 41 #include "base/timer/timer.h"
42 #include "base/win/message_window.h" 42 #include "base/win/message_window.h"
43 #include "device/usb/usb_ids.h" 43 #include "device/usb/usb_ids.h"
44 #include "media/midi/midi_manager.h" 44 #include "media/midi/midi_manager.h"
45 #include "media/midi/midi_message_queue.h" 45 #include "media/midi/midi_message_queue.h"
46 #include "media/midi/midi_message_util.h" 46 #include "media/midi/midi_message_util.h"
47 #include "media/midi/midi_port_info.h" 47 #include "media/midi/midi_port_info.h"
48 48
49 namespace media { 49 namespace media {
50 namespace midi {
50 namespace { 51 namespace {
51 52
52 static const size_t kBufferLength = 32 * 1024; 53 static const size_t kBufferLength = 32 * 1024;
53 54
54 // We assume that nullpter represents an invalid MIDI handle. 55 // We assume that nullpter represents an invalid MIDI handle.
55 const HMIDIIN kInvalidMidiInHandle = nullptr; 56 const HMIDIIN kInvalidMidiInHandle = nullptr;
56 const HMIDIOUT kInvalidMidiOutHandle = nullptr; 57 const HMIDIOUT kInvalidMidiOutHandle = nullptr;
57 58
58 std::string GetInErrorMessage(MMRESULT result) { 59 std::string GetInErrorMessage(MMRESULT result) {
59 wchar_t text[MAXERRORLENGTH]; 60 wchar_t text[MAXERRORLENGTH];
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 void MidiManagerWin::OnReceiveMidiData(uint32 port_index, 1160 void MidiManagerWin::OnReceiveMidiData(uint32 port_index,
1160 const std::vector<uint8>& data, 1161 const std::vector<uint8>& data,
1161 base::TimeTicks time) { 1162 base::TimeTicks time) {
1162 ReceiveMidiData(port_index, &data[0], data.size(), time); 1163 ReceiveMidiData(port_index, &data[0], data.size(), time);
1163 } 1164 }
1164 1165
1165 MidiManager* MidiManager::Create() { 1166 MidiManager* MidiManager::Create() {
1166 return new MidiManagerWin(); 1167 return new MidiManagerWin();
1167 } 1168 }
1168 1169
1170 } // namespace midi
1169 } // namespace media 1171 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_manager_win.h ('k') | media/midi/midi_message_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698