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

Side by Side Diff: media/midi/midi_manager_mac_unittest.cc

Issue 2404443002: Web MIDI: use midi_service.mojom for media::midi::Result (Closed)
Patch Set: yhirano@ review Created 4 years, 2 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 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 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 namespace midi { 20 namespace midi {
21 21
22 namespace { 22 namespace {
23 23
24 using mojom::Result;
25
24 void Noop(const MIDIPacketList*, void*, void*) {} 26 void Noop(const MIDIPacketList*, void*, void*) {}
25 27
26 class FakeMidiManagerClient : public MidiManagerClient { 28 class FakeMidiManagerClient : public MidiManagerClient {
27 public: 29 public:
28 FakeMidiManagerClient() 30 FakeMidiManagerClient()
29 : result_(Result::NOT_SUPPORTED), 31 : result_(Result::NOT_SUPPORTED),
30 wait_for_result_(true), 32 wait_for_result_(true),
31 wait_for_port_(true), 33 wait_for_port_(true),
32 unexpected_callback_(false) {} 34 unexpected_callback_(false) {}
33 35
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 EndSession(client.get()); 165 EndSession(client.get());
164 if (ep) 166 if (ep)
165 MIDIEndpointDispose(ep); 167 MIDIEndpointDispose(ep);
166 if (midi_client) 168 if (midi_client)
167 MIDIClientDispose(midi_client); 169 MIDIClientDispose(midi_client);
168 } 170 }
169 171
170 } // namespace 172 } // namespace
171 173
172 } // namespace midi 174 } // namespace midi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698