Chromium Code Reviews| Index: media/midi/midi_manager_winrt.h |
| diff --git a/media/midi/midi_manager_winrt.h b/media/midi/midi_manager_winrt.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e63d5db095ed552906d8b0cc26544d9f6680cd8c |
| --- /dev/null |
| +++ b/media/midi/midi_manager_winrt.h |
| @@ -0,0 +1,67 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_MIDI_MIDI_MANAGER_WINRT_H_ |
| +#define MEDIA_MIDI_MIDI_MANAGER_WINRT_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/threading/thread.h" |
| +#include "media/midi/midi_manager.h" |
| +#include "media/midi/midi_scheduler.h" |
| + |
| +namespace media { |
| +namespace midi { |
| + |
| +class MIDI_EXPORT MidiManagerWinrt final : public MidiManager { |
| + public: |
| + MidiManagerWinrt(); |
| + ~MidiManagerWinrt() override; |
| + |
| + // MidiManager overrides: |
| + void StartInitialization() final; |
| + void Finalize() final; |
| + void DispatchSendMidiData(MidiManagerClient* client, |
| + uint32_t port_index, |
| + const std::vector<uint8_t>& data, |
| + double timestamp) final; |
| + |
| + private: |
| + ///////////////////////////////////////////////////////////////////////////// |
|
Takashi Toyoshima
2016/08/16 09:30:29
This style of comments were used in _win.cc, but i
Shao-Chuan Lee
2016/08/18 08:48:57
Done.
|
| + // Callbacks on the COM thread. |
| + ///////////////////////////////////////////////////////////////////////////// |
| + |
| + void AssertOnComThread(); |
| + void InitializeOnComThread(); |
| + void PostSendDataTaskOnComThread(MidiManagerClient* client, |
| + uint32_t port_index, |
| + const std::vector<uint8_t>& data, |
| + double timestamp); |
| + void SendOnComThread(uint32_t port_index, const std::vector<uint8_t>& data); |
| + |
| + ///////////////////////////////////////////////////////////////////////////// |
|
Takashi Toyoshima
2016/08/16 09:30:30
ditto
Shao-Chuan Lee
2016/08/18 08:48:57
Done.
|
| + // Subclasses that access protected members of MidiManager. |
| + ///////////////////////////////////////////////////////////////////////////// |
| + |
| + class MidiInPortManager; |
| + class MidiOutPortManager; |
| + |
| + ///////////////////////////////////////////////////////////////////////////// |
|
Takashi Toyoshima
2016/08/16 09:30:30
ditto
Shao-Chuan Lee
2016/08/18 08:48:57
Done.
|
| + // Fields: |
| + ///////////////////////////////////////////////////////////////////////////// |
| + |
| + std::unique_ptr<MidiInPortManager> port_manager_in_; |
| + std::unique_ptr<MidiOutPortManager> port_manager_out_; |
| + |
| + std::unique_ptr<MidiScheduler> scheduler_; |
| + |
| + base::Thread com_thread_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MidiManagerWinrt); |
| +}; |
| + |
| +} // namespace midi |
| +} // namespace media |
| + |
| +#endif // MEDIA_MIDI_MIDI_MANAGER_WINRT_H_ |