OLD | NEW |
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_manager_mac.h" | 5 #include "media/midi/midi_manager_mac.h" |
6 | 6 |
7 #include <CoreMIDI/MIDIServices.h> | 7 #include <CoreMIDI/MIDIServices.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace media { | 16 namespace media { |
| 17 namespace midi { |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 void Noop(const MIDIPacketList*, void*, void*) {} | 21 void Noop(const MIDIPacketList*, void*, void*) {} |
21 | 22 |
22 class FakeMidiManagerClient : public MidiManagerClient { | 23 class FakeMidiManagerClient : public MidiManagerClient { |
23 public: | 24 public: |
24 FakeMidiManagerClient() | 25 FakeMidiManagerClient() |
25 : result_(MIDI_NOT_SUPPORTED), | 26 : result_(MIDI_NOT_SUPPORTED), |
26 wait_for_result_(true), | 27 wait_for_result_(true), |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 151 |
151 EndSession(client.get()); | 152 EndSession(client.get()); |
152 if (ep) | 153 if (ep) |
153 MIDIEndpointDispose(ep); | 154 MIDIEndpointDispose(ep); |
154 if (midi_client) | 155 if (midi_client) |
155 MIDIClientDispose(midi_client); | 156 MIDIClientDispose(midi_client); |
156 } | 157 } |
157 | 158 |
158 } // namespace | 159 } // namespace |
159 | 160 |
| 161 } // namespace midi |
160 } // namespace media | 162 } // namespace media |
OLD | NEW |