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

Side by Side Diff: media/midi/midi_manager_win.h

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 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 #ifndef MEDIA_MIDI_MIDI_MANAGER_WIN_H_ 5 #ifndef MEDIA_MIDI_MIDI_MANAGER_WIN_H_
6 #define MEDIA_MIDI_MIDI_MANAGER_WIN_H_ 6 #define MEDIA_MIDI_MIDI_MANAGER_WIN_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/midi/midi_manager.h" 16 #include "media/midi/midi_manager.h"
17 17
18 namespace midi { 18 namespace midi {
19 19
20 class MidiServiceWinDelegate { 20 class MidiServiceWinDelegate {
21 public: 21 public:
22 virtual ~MidiServiceWinDelegate() {} 22 virtual ~MidiServiceWinDelegate() {}
23 virtual void OnCompleteInitialization(Result result) = 0; 23 virtual void OnCompleteInitialization(mojom::Result result) = 0;
24 virtual void OnAddInputPort(MidiPortInfo info) = 0; 24 virtual void OnAddInputPort(MidiPortInfo info) = 0;
25 virtual void OnAddOutputPort(MidiPortInfo info) = 0; 25 virtual void OnAddOutputPort(MidiPortInfo info) = 0;
26 virtual void OnSetInputPortState(uint32_t port_index, 26 virtual void OnSetInputPortState(uint32_t port_index,
27 MidiPortState state) = 0; 27 MidiPortState state) = 0;
28 virtual void OnSetOutputPortState(uint32_t port_index, 28 virtual void OnSetOutputPortState(uint32_t port_index,
29 MidiPortState state) = 0; 29 MidiPortState state) = 0;
30 virtual void OnReceiveMidiData(uint32_t port_index, 30 virtual void OnReceiveMidiData(uint32_t port_index,
31 const std::vector<uint8_t>& data, 31 const std::vector<uint8_t>& data,
32 base::TimeTicks time) = 0; 32 base::TimeTicks time) = 0;
33 }; 33 };
(...skipping 16 matching lines...) Expand all
50 50
51 // MidiManager overrides: 51 // MidiManager overrides:
52 void StartInitialization() final; 52 void StartInitialization() final;
53 void Finalize() final; 53 void Finalize() final;
54 void DispatchSendMidiData(MidiManagerClient* client, 54 void DispatchSendMidiData(MidiManagerClient* client,
55 uint32_t port_index, 55 uint32_t port_index,
56 const std::vector<uint8_t>& data, 56 const std::vector<uint8_t>& data,
57 double timestamp) final; 57 double timestamp) final;
58 58
59 // MidiServiceWinDelegate overrides: 59 // MidiServiceWinDelegate overrides:
60 void OnCompleteInitialization(Result result) final; 60 void OnCompleteInitialization(mojom::Result result) final;
61 void OnAddInputPort(MidiPortInfo info) final; 61 void OnAddInputPort(MidiPortInfo info) final;
62 void OnAddOutputPort(MidiPortInfo info) final; 62 void OnAddOutputPort(MidiPortInfo info) final;
63 void OnSetInputPortState(uint32_t port_index, MidiPortState state) final; 63 void OnSetInputPortState(uint32_t port_index, MidiPortState state) final;
64 void OnSetOutputPortState(uint32_t port_index, MidiPortState state) final; 64 void OnSetOutputPortState(uint32_t port_index, MidiPortState state) final;
65 void OnReceiveMidiData(uint32_t port_index, 65 void OnReceiveMidiData(uint32_t port_index,
66 const std::vector<uint8_t>& data, 66 const std::vector<uint8_t>& data,
67 base::TimeTicks time) final; 67 base::TimeTicks time) final;
68 68
69 private: 69 private:
70 std::unique_ptr<MidiServiceWin> midi_service_; 70 std::unique_ptr<MidiServiceWin> midi_service_;
71 DISALLOW_COPY_AND_ASSIGN(MidiManagerWin); 71 DISALLOW_COPY_AND_ASSIGN(MidiManagerWin);
72 }; 72 };
73 73
74 } // namespace midi 74 } // namespace midi
75 75
76 #endif // MEDIA_MIDI_MIDI_MANAGER_WIN_H_ 76 #endif // MEDIA_MIDI_MIDI_MANAGER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698