OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // MessageFilter that handles audio messages and delegates them to audio | 5 // MessageFilter that handles audio messages and delegates them to audio |
6 // renderers. Created on render thread, AudioMessageFilter is operated on | 6 // renderers. Created on render thread, AudioMessageFilter is operated on |
7 // IO thread (main thread of render process), it intercepts audio messages | 7 // IO thread (main thread of render process), it intercepts audio messages |
8 // and process them on IO thread since these messages are time critical. | 8 // and process them on IO thread since these messages are time critical. |
9 | 9 |
10 #ifndef CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_ | 10 #ifndef CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_ |
11 #define CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_ | 11 #define CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_ |
12 | 12 |
13 #include "base/id_map.h" | |
14 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
| 14 #include "chrome/common/id_map.h" |
15 #include "chrome/common/render_messages.h" | 15 #include "chrome/common/render_messages.h" |
16 #include "ipc/ipc_channel_proxy.h" | 16 #include "ipc/ipc_channel_proxy.h" |
17 #include "testing/gtest/include/gtest/gtest_prod.h" | 17 #include "testing/gtest/include/gtest/gtest_prod.h" |
18 | 18 |
19 class AudioMessageFilter : public IPC::ChannelProxy::MessageFilter { | 19 class AudioMessageFilter : public IPC::ChannelProxy::MessageFilter { |
20 public: | 20 public: |
21 class Delegate { | 21 class Delegate { |
22 public: | 22 public: |
23 // Called when an audio packet is requested from the browser process. | 23 // Called when an audio packet is requested from the browser process. |
24 virtual void OnRequestPacket(size_t bytes_in_buffer, | 24 virtual void OnRequestPacket(size_t bytes_in_buffer, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 IPC::Channel* channel_; | 80 IPC::Channel* channel_; |
81 | 81 |
82 int32 route_id_; | 82 int32 route_id_; |
83 | 83 |
84 MessageLoop* message_loop_; | 84 MessageLoop* message_loop_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(AudioMessageFilter); | 86 DISALLOW_COPY_AND_ASSIGN(AudioMessageFilter); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_RENDERER_AUDIO_MESSAGE_FITLER_H_ | 89 #endif // CHROME_RENDERER_AUDIO_MESSAGE_FITLER_H_ |
OLD | NEW |