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" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool unexpected_callback_; | 98 bool unexpected_callback_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(FakeMidiManagerClient); | 100 DISALLOW_COPY_AND_ASSIGN(FakeMidiManagerClient); |
101 }; | 101 }; |
102 | 102 |
103 class MidiManagerMacTest : public ::testing::Test { | 103 class MidiManagerMacTest : public ::testing::Test { |
104 public: | 104 public: |
105 MidiManagerMacTest() | 105 MidiManagerMacTest() |
106 : manager_(new MidiManagerMac), | 106 : manager_(new MidiManagerMac), |
107 message_loop_(new base::MessageLoop) {} | 107 message_loop_(new base::MessageLoop) {} |
| 108 ~MidiManagerMacTest() override { |
| 109 manager_->Shutdown(); |
| 110 } |
108 | 111 |
109 protected: | 112 protected: |
110 void StartSession(MidiManagerClient* client) { | 113 void StartSession(MidiManagerClient* client) { |
111 manager_->StartSession(client); | 114 manager_->StartSession(client); |
112 } | 115 } |
113 void EndSession(MidiManagerClient* client) { | 116 void EndSession(MidiManagerClient* client) { |
114 manager_->EndSession(client); | 117 manager_->EndSession(client); |
115 } | 118 } |
116 | 119 |
117 private: | 120 private: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 if (ep) | 156 if (ep) |
154 MIDIEndpointDispose(ep); | 157 MIDIEndpointDispose(ep); |
155 if (midi_client) | 158 if (midi_client) |
156 MIDIClientDispose(midi_client); | 159 MIDIClientDispose(midi_client); |
157 } | 160 } |
158 | 161 |
159 } // namespace | 162 } // namespace |
160 | 163 |
161 } // namespace midi | 164 } // namespace midi |
162 } // namespace media | 165 } // namespace media |
OLD | NEW |