OLD | NEW |
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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 virtual ~MidiServiceWin() {} | 33 virtual ~MidiServiceWin() {} |
34 // This method may return before the initialization is completed. | 34 // This method may return before the initialization is completed. |
35 virtual void InitializeAsync(MidiServiceWinDelegate* delegate) = 0; | 35 virtual void InitializeAsync(MidiServiceWinDelegate* delegate) = 0; |
36 // This method may return before the specified data is actually sent. | 36 // This method may return before the specified data is actually sent. |
37 virtual void SendMidiDataAsync(uint32 port_number, | 37 virtual void SendMidiDataAsync(uint32 port_number, |
38 const std::vector<uint8>& data, | 38 const std::vector<uint8>& data, |
39 base::TimeTicks time) = 0; | 39 base::TimeTicks time) = 0; |
40 }; | 40 }; |
41 | 41 |
42 class MidiManagerWin : public MidiManager, public MidiServiceWinDelegate { | 42 class MidiManagerWin final : public MidiManager, public MidiServiceWinDelegate { |
43 public: | 43 public: |
44 MidiManagerWin() {} | 44 MidiManagerWin() {} |
45 virtual ~MidiManagerWin() { midi_service_.reset(); } | 45 virtual ~MidiManagerWin() { midi_service_.reset(); } |
46 | 46 |
47 // MidiManager overrides: | 47 // MidiManager overrides: |
48 void StartInitialization() final; | 48 void StartInitialization() final; |
49 void DispatchSendMidiData(MidiManagerClient* client, | 49 void DispatchSendMidiData(MidiManagerClient* client, |
50 uint32 port_index, | 50 uint32 port_index, |
51 const std::vector<uint8>& data, | 51 const std::vector<uint8>& data, |
52 double timestamp) final; | 52 double timestamp) final; |
(...skipping 17 matching lines...) Expand all Loading... |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 scoped_ptr<MidiServiceWin> midi_service_; | 73 scoped_ptr<MidiServiceWin> midi_service_; |
74 DISALLOW_COPY_AND_ASSIGN(MidiManagerWin); | 74 DISALLOW_COPY_AND_ASSIGN(MidiManagerWin); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace media | 77 } // namespace media |
78 | 78 |
79 #endif // MEDIA_MIDI_MIDI_MANAGER_WIN_H_ | 79 #endif // MEDIA_MIDI_MIDI_MANAGER_WIN_H_ |
OLD | NEW |