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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class CONTENT_EXPORT MIDIHost | 23 class CONTENT_EXPORT MIDIHost |
24 : public BrowserMessageFilter, | 24 : public BrowserMessageFilter, |
25 public media::MIDIManagerClient { | 25 public media::MIDIManagerClient { |
26 public: | 26 public: |
27 // Called from UI thread from the owner of this object. | 27 // Called from UI thread from the owner of this object. |
28 MIDIHost(int renderer_process_id, media::MIDIManager* midi_manager); | 28 MIDIHost(int renderer_process_id, media::MIDIManager* midi_manager); |
29 | 29 |
30 // BrowserMessageFilter implementation. | 30 // BrowserMessageFilter implementation. |
31 virtual void OnChannelClosing() OVERRIDE; | |
32 virtual void OnDestruct() const OVERRIDE; | 31 virtual void OnDestruct() const OVERRIDE; |
33 virtual bool OnMessageReceived(const IPC::Message& message, | 32 virtual bool OnMessageReceived(const IPC::Message& message, |
34 bool* message_was_ok) OVERRIDE; | 33 bool* message_was_ok) OVERRIDE; |
35 | 34 |
36 // MIDIManagerClient implementation. | 35 // MIDIManagerClient implementation. |
37 virtual void ReceiveMIDIData( | 36 virtual void ReceiveMIDIData( |
38 uint32 port, | 37 uint32 port, |
39 const uint8* data, | 38 const uint8* data, |
40 size_t length, | 39 size_t length, |
41 double timestamp) OVERRIDE; | 40 double timestamp) OVERRIDE; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 73 |
75 // Protects access to |sent_bytes_in_flight_|. | 74 // Protects access to |sent_bytes_in_flight_|. |
76 base::Lock in_flight_lock_; | 75 base::Lock in_flight_lock_; |
77 | 76 |
78 DISALLOW_COPY_AND_ASSIGN(MIDIHost); | 77 DISALLOW_COPY_AND_ASSIGN(MIDIHost); |
79 }; | 78 }; |
80 | 79 |
81 } // namespace content | 80 } // namespace content |
82 | 81 |
83 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ | 82 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_ |
OLD | NEW |