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_RENDERER_HOST_MEDIA_MIDI_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_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 14 matching lines...) Expand all Loading... |
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, | 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
36 bool* message_was_ok) OVERRIDE; | |
37 | 36 |
38 // MidiManagerClient implementation. | 37 // MidiManagerClient implementation. |
39 virtual void CompleteStartSession(int client_id, | 38 virtual void CompleteStartSession(int client_id, |
40 media::MidiResult result) OVERRIDE; | 39 media::MidiResult result) OVERRIDE; |
41 virtual void ReceiveMidiData(uint32 port, | 40 virtual void ReceiveMidiData(uint32 port, |
42 const uint8* data, | 41 const uint8* data, |
43 size_t length, | 42 size_t length, |
44 double timestamp) OVERRIDE; | 43 double timestamp) OVERRIDE; |
45 virtual void AccumulateMidiBytesSent(size_t n) OVERRIDE; | 44 virtual void AccumulateMidiBytesSent(size_t n) OVERRIDE; |
46 | 45 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 91 |
93 // Protects access to |sent_bytes_in_flight_|. | 92 // Protects access to |sent_bytes_in_flight_|. |
94 base::Lock in_flight_lock_; | 93 base::Lock in_flight_lock_; |
95 | 94 |
96 DISALLOW_COPY_AND_ASSIGN(MidiHost); | 95 DISALLOW_COPY_AND_ASSIGN(MidiHost); |
97 }; | 96 }; |
98 | 97 |
99 } // namespace content | 98 } // namespace content |
100 | 99 |
101 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ | 100 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ |
OLD | NEW |