OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/renderer_host/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
6 | 6 |
7 #include "base/clipboard.h" | 7 #include "base/clipboard.h" |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ScriptedPrint, | 227 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ScriptedPrint, |
228 OnScriptedPrint) | 228 OnScriptedPrint) |
229 #endif | 229 #endif |
230 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateAudioStream, OnCreateAudioStream) | 230 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateAudioStream, OnCreateAudioStream) |
231 IPC_MESSAGE_HANDLER(ViewHostMsg_StartAudioStream, OnStartAudioStream) | 231 IPC_MESSAGE_HANDLER(ViewHostMsg_StartAudioStream, OnStartAudioStream) |
232 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseAudioStream, OnCloseAudioStream) | 232 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseAudioStream, OnCloseAudioStream) |
233 IPC_MESSAGE_HANDLER(ViewHostMsg_NotifyAudioPacketReady, | 233 IPC_MESSAGE_HANDLER(ViewHostMsg_NotifyAudioPacketReady, |
234 OnNotifyAudioPacketReady) | 234 OnNotifyAudioPacketReady) |
235 IPC_MESSAGE_HANDLER(ViewHostMsg_GetAudioVolume, OnGetAudioVolume) | 235 IPC_MESSAGE_HANDLER(ViewHostMsg_GetAudioVolume, OnGetAudioVolume) |
236 IPC_MESSAGE_HANDLER(ViewHostMsg_SetAudioVolume, OnSetAudioVolume) | 236 IPC_MESSAGE_HANDLER(ViewHostMsg_SetAudioVolume, OnSetAudioVolume) |
| 237 #if defined(OS_MACOSX) |
| 238 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocTransportDIB, |
| 239 OnAllocTransportDIB) |
| 240 IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, |
| 241 OnFreeTransportDIB) |
| 242 #endif |
237 IPC_MESSAGE_UNHANDLED( | 243 IPC_MESSAGE_UNHANDLED( |
238 handled = false) | 244 handled = false) |
239 IPC_END_MESSAGE_MAP_EX() | 245 IPC_END_MESSAGE_MAP_EX() |
240 | 246 |
241 if (!msg_is_ok) { | 247 if (!msg_is_ok) { |
242 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), | 248 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), |
243 render_handle_); | 249 render_handle_); |
244 } | 250 } |
245 | 251 |
246 return handled; | 252 return handled; |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 const IPC::Message& msg, int stream_id) { | 793 const IPC::Message& msg, int stream_id) { |
788 // TODO(hclam): delegate to AudioRendererHost and handle this message. Send | 794 // TODO(hclam): delegate to AudioRendererHost and handle this message. Send |
789 // a message about the volume. | 795 // a message about the volume. |
790 } | 796 } |
791 | 797 |
792 void ResourceMessageFilter::OnSetAudioVolume( | 798 void ResourceMessageFilter::OnSetAudioVolume( |
793 const IPC::Message& msg, int stream_id, | 799 const IPC::Message& msg, int stream_id, |
794 double left_channel, double right_channel) { | 800 double left_channel, double right_channel) { |
795 // TODO(hclam): delegate to AudioRendererHost and handle this message. | 801 // TODO(hclam): delegate to AudioRendererHost and handle this message. |
796 } | 802 } |
| 803 |
| 804 #if defined(OS_MACOSX) |
| 805 void ResourceMessageFilter::OnAllocTransportDIB( |
| 806 size_t size, IPC::Maybe<TransportDIB::Handle>* handle) { |
| 807 render_widget_helper_->AllocTransportDIB(size, handle); |
| 808 } |
| 809 |
| 810 void ResourceMessageFilter::OnFreeTransportDIB( |
| 811 TransportDIB::Id dib_id) { |
| 812 render_widget_helper_->FreeTransportDIB(dib_id); |
| 813 } |
| 814 #endif |
OLD | NEW |