OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ |
6 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Implementation of media::AudioInputIPC which augments IPC calls with | 46 // Implementation of media::AudioInputIPC which augments IPC calls with |
47 // stream_id and the destination render_view_id. | 47 // stream_id and the destination render_view_id. |
48 class AudioInputIPCImpl; | 48 class AudioInputIPCImpl; |
49 | 49 |
50 virtual ~AudioInputMessageFilter(); | 50 virtual ~AudioInputMessageFilter(); |
51 | 51 |
52 // Sends an IPC message using |channel_|. | 52 // Sends an IPC message using |channel_|. |
53 void Send(IPC::Message* message); | 53 void Send(IPC::Message* message); |
54 | 54 |
55 // IPC::MessageFilter override. Called on |io_message_loop_|. | 55 // IPC::MessageFilter override. Called on |io_message_loop_|. |
56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 56 virtual bool OnMessageReceived(const IPC::Message& message) override; |
57 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; | 57 virtual void OnFilterAdded(IPC::Sender* sender) override; |
58 virtual void OnFilterRemoved() OVERRIDE; | 58 virtual void OnFilterRemoved() override; |
59 virtual void OnChannelClosing() OVERRIDE; | 59 virtual void OnChannelClosing() override; |
60 | 60 |
61 // Received when browser process has created an audio input stream. | 61 // Received when browser process has created an audio input stream. |
62 void OnStreamCreated(int stream_id, | 62 void OnStreamCreated(int stream_id, |
63 base::SharedMemoryHandle handle, | 63 base::SharedMemoryHandle handle, |
64 #if defined(OS_WIN) | 64 #if defined(OS_WIN) |
65 base::SyncSocket::Handle socket_handle, | 65 base::SyncSocket::Handle socket_handle, |
66 #else | 66 #else |
67 base::FileDescriptor socket_descriptor, | 67 base::FileDescriptor socket_descriptor, |
68 #endif | 68 #endif |
69 uint32 length, | 69 uint32 length, |
(...skipping 18 matching lines...) Expand all Loading... |
88 | 88 |
89 // The singleton instance for this filter. | 89 // The singleton instance for this filter. |
90 static AudioInputMessageFilter* g_filter; | 90 static AudioInputMessageFilter* g_filter; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(AudioInputMessageFilter); | 92 DISALLOW_COPY_AND_ASSIGN(AudioInputMessageFilter); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace content | 95 } // namespace content |
96 | 96 |
97 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ | 97 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ |
OLD | NEW |