OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ |
6 #define CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ | 6 #define CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class CONTENT_EXPORT MidiHost | 26 class CONTENT_EXPORT MidiHost |
27 : public BrowserMessageFilter, | 27 : public BrowserMessageFilter, |
28 public media::MidiManagerClient { | 28 public media::MidiManagerClient { |
29 public: | 29 public: |
30 // Called from UI thread from the owner of this object. | 30 // Called from UI thread from the owner of this object. |
31 MidiHost(int renderer_process_id, media::MidiManager* midi_manager); | 31 MidiHost(int renderer_process_id, media::MidiManager* midi_manager); |
32 | 32 |
33 // BrowserMessageFilter implementation. | 33 // BrowserMessageFilter implementation. |
34 virtual void OnDestruct() const OVERRIDE; | 34 virtual void OnDestruct() const override; |
35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 35 virtual bool OnMessageReceived(const IPC::Message& message) override; |
36 | 36 |
37 // MidiManagerClient implementation. | 37 // MidiManagerClient implementation. |
38 virtual void CompleteStartSession(int client_id, | 38 virtual void CompleteStartSession(int client_id, |
39 media::MidiResult result) OVERRIDE; | 39 media::MidiResult result) override; |
40 virtual void ReceiveMidiData(uint32 port, | 40 virtual void ReceiveMidiData(uint32 port, |
41 const uint8* data, | 41 const uint8* data, |
42 size_t length, | 42 size_t length, |
43 double timestamp) OVERRIDE; | 43 double timestamp) override; |
44 virtual void AccumulateMidiBytesSent(size_t n) OVERRIDE; | 44 virtual void AccumulateMidiBytesSent(size_t n) override; |
45 | 45 |
46 // Start session to access MIDI hardware. | 46 // Start session to access MIDI hardware. |
47 void OnStartSession(int client_id); | 47 void OnStartSession(int client_id); |
48 | 48 |
49 // Data to be sent to a MIDI output port. | 49 // Data to be sent to a MIDI output port. |
50 void OnSendData(uint32 port, | 50 void OnSendData(uint32 port, |
51 const std::vector<uint8>& data, | 51 const std::vector<uint8>& data, |
52 double timestamp); | 52 double timestamp); |
53 | 53 |
54 private: | 54 private: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Protects access to |sent_bytes_in_flight_|. | 92 // Protects access to |sent_bytes_in_flight_|. |
93 base::Lock in_flight_lock_; | 93 base::Lock in_flight_lock_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(MidiHost); | 95 DISALLOW_COPY_AND_ASSIGN(MidiHost); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace content | 98 } // namespace content |
99 | 99 |
100 #endif // CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ | 100 #endif // CONTENT_BROWSER_MEDIA_MIDI_HOST_H_ |
OLD | NEW |