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

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

Issue 2243183002: Web MIDI backend for Windows 10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_MIDI_MIDI_MANAGER_WINRT_H_
6 #define MEDIA_MIDI_MIDI_MANAGER_WINRT_H_
7
8 #include <memory>
9
10 #include "base/threading/thread.h"
11 #include "media/midi/midi_manager.h"
12 #include "media/midi/midi_scheduler.h"
13
14 namespace media {
15 namespace midi {
16
17 class MIDI_EXPORT MidiManagerWinrt final : public MidiManager {
18 public:
19 MidiManagerWinrt();
20 ~MidiManagerWinrt() override;
21
22 // MidiManager overrides:
23 void StartInitialization() final;
24 void Finalize() final;
25 void DispatchSendMidiData(MidiManagerClient* client,
26 uint32_t port_index,
27 const std::vector<uint8_t>& data,
28 double timestamp) final;
29
30 private:
31 /////////////////////////////////////////////////////////////////////////////
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.
32 // Callbacks on the COM thread.
33 /////////////////////////////////////////////////////////////////////////////
34
35 void AssertOnComThread();
36 void InitializeOnComThread();
37 void PostSendDataTaskOnComThread(MidiManagerClient* client,
38 uint32_t port_index,
39 const std::vector<uint8_t>& data,
40 double timestamp);
41 void SendOnComThread(uint32_t port_index, const std::vector<uint8_t>& data);
42
43 /////////////////////////////////////////////////////////////////////////////
Takashi Toyoshima 2016/08/16 09:30:30 ditto
Shao-Chuan Lee 2016/08/18 08:48:57 Done.
44 // Subclasses that access protected members of MidiManager.
45 /////////////////////////////////////////////////////////////////////////////
46
47 class MidiInPortManager;
48 class MidiOutPortManager;
49
50 /////////////////////////////////////////////////////////////////////////////
Takashi Toyoshima 2016/08/16 09:30:30 ditto
Shao-Chuan Lee 2016/08/18 08:48:57 Done.
51 // Fields:
52 /////////////////////////////////////////////////////////////////////////////
53
54 std::unique_ptr<MidiInPortManager> port_manager_in_;
55 std::unique_ptr<MidiOutPortManager> port_manager_out_;
56
57 std::unique_ptr<MidiScheduler> scheduler_;
58
59 base::Thread com_thread_;
60
61 DISALLOW_COPY_AND_ASSIGN(MidiManagerWinrt);
62 };
63
64 } // namespace midi
65 } // namespace media
66
67 #endif // MEDIA_MIDI_MIDI_MANAGER_WINRT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698