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 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ |
7 | 7 |
8 #include "base/clipboard.h" | 8 #include "base/clipboard.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
11 #include "base/gfx/native_widget_types.h" | 11 #include "base/gfx/native_widget_types.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 15 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
17 #include "chrome/common/ipc_channel_proxy.h" | 17 #include "chrome/common/ipc_channel_proxy.h" |
| 18 #include "chrome/common/ipc_maybe.h" |
18 #include "chrome/common/modal_dialog_event.h" | 19 #include "chrome/common/modal_dialog_event.h" |
19 #include "chrome/common/notification_observer.h" | 20 #include "chrome/common/notification_observer.h" |
| 21 #include "chrome/common/transport_dib.h" |
20 #include "webkit/glue/cache_manager.h" | 22 #include "webkit/glue/cache_manager.h" |
21 | 23 |
22 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
23 #include <windows.h> | 25 #include <windows.h> |
24 #else | 26 #else |
25 // TODO(port): port ResourceDispatcherHost. | 27 // TODO(port): port ResourceDispatcherHost. |
26 #include "chrome/common/temp_scaffolding_stubs.h" | 28 #include "chrome/common/temp_scaffolding_stubs.h" |
27 #endif | 29 #endif |
28 | 30 |
29 class AudioRendererHost; | 31 class AudioRendererHost; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void OnGetMimeTypeFromFile(const FilePath& file_path, | 162 void OnGetMimeTypeFromFile(const FilePath& file_path, |
161 std::string* mime_type); | 163 std::string* mime_type); |
162 void OnGetPreferredExtensionForMimeType(const std::string& mime_type, | 164 void OnGetPreferredExtensionForMimeType(const std::string& mime_type, |
163 FilePath::StringType* ext); | 165 FilePath::StringType* ext); |
164 void OnGetCPBrowsingContext(uint32* context); | 166 void OnGetCPBrowsingContext(uint32* context); |
165 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 167 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
166 base::SharedMemoryHandle* browser_handle); | 168 base::SharedMemoryHandle* browser_handle); |
167 void OnResourceTypeStats(const CacheManager::ResourceTypeStats& stats); | 169 void OnResourceTypeStats(const CacheManager::ResourceTypeStats& stats); |
168 | 170 |
169 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); | 171 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); |
170 | 172 |
171 // ResolveProxyMsgHelper::Delegate implementation: | 173 // ResolveProxyMsgHelper::Delegate implementation: |
172 virtual void OnResolveProxyCompleted(IPC::Message* reply_msg, | 174 virtual void OnResolveProxyCompleted(IPC::Message* reply_msg, |
173 int result, | 175 int result, |
174 const std::string& proxy_list); | 176 const std::string& proxy_list); |
175 | 177 |
176 // A javascript code requested to print the current page. This is done in two | 178 // A javascript code requested to print the current page. This is done in two |
177 // steps and this is the first step. Get the print setting right here | 179 // steps and this is the first step. Get the print setting right here |
178 // synchronously. It will hang the I/O completely. | 180 // synchronously. It will hang the I/O completely. |
179 void OnGetDefaultPrintSettings(IPC::Message* reply_msg); | 181 void OnGetDefaultPrintSettings(IPC::Message* reply_msg); |
180 void OnGetDefaultPrintSettingsReply( | 182 void OnGetDefaultPrintSettingsReply( |
(...skipping 15 matching lines...) Expand all Loading... |
196 // Audio related IPC message handlers. | 198 // Audio related IPC message handlers. |
197 void OnCreateAudioStream(const IPC::Message& msg, int stream_id, | 199 void OnCreateAudioStream(const IPC::Message& msg, int stream_id, |
198 const ViewHostMsg_Audio_CreateStream& params); | 200 const ViewHostMsg_Audio_CreateStream& params); |
199 void OnNotifyAudioPacketReady(const IPC::Message& msg, int stream_id); | 201 void OnNotifyAudioPacketReady(const IPC::Message& msg, int stream_id); |
200 void OnStartAudioStream(const IPC::Message& msg, int stream_id); | 202 void OnStartAudioStream(const IPC::Message& msg, int stream_id); |
201 void OnCloseAudioStream(const IPC::Message& msg, int stream_id); | 203 void OnCloseAudioStream(const IPC::Message& msg, int stream_id); |
202 void OnGetAudioVolume(const IPC::Message& msg, int stream_id); | 204 void OnGetAudioVolume(const IPC::Message& msg, int stream_id); |
203 void OnSetAudioVolume(const IPC::Message& msg, int stream_id, | 205 void OnSetAudioVolume(const IPC::Message& msg, int stream_id, |
204 double left_channel, double right_channel); | 206 double left_channel, double right_channel); |
205 | 207 |
| 208 // Browser side transport DIB allocation |
| 209 void OnAllocTransportDIB(size_t size, |
| 210 IPC::Maybe<TransportDIB::Handle>* result); |
| 211 void OnFreeTransportDIB(TransportDIB::Id dib_id); |
| 212 |
206 // We have our own clipboard service because we want to access the clipboard | 213 // We have our own clipboard service because we want to access the clipboard |
207 // on the IO thread instead of forwarding (possibly synchronous) messages to | 214 // on the IO thread instead of forwarding (possibly synchronous) messages to |
208 // the UI thread. | 215 // the UI thread. |
209 // This instance of the clipboard service should be accessed only on the IO | 216 // This instance of the clipboard service should be accessed only on the IO |
210 // thread. | 217 // thread. |
211 static ClipboardService* GetClipboardService(); | 218 static ClipboardService* GetClipboardService(); |
212 | 219 |
213 // The channel associated with the renderer connection. This pointer is not | 220 // The channel associated with the renderer connection. This pointer is not |
214 // owned by this class. | 221 // owned by this class. |
215 IPC::Channel* channel_; | 222 IPC::Channel* channel_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 259 |
253 scoped_refptr<RenderWidgetHelper> render_widget_helper_; | 260 scoped_refptr<RenderWidgetHelper> render_widget_helper_; |
254 | 261 |
255 // Object that should take care of audio related resource requests. | 262 // Object that should take care of audio related resource requests. |
256 scoped_refptr<AudioRendererHost> audio_renderer_host_; | 263 scoped_refptr<AudioRendererHost> audio_renderer_host_; |
257 | 264 |
258 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); | 265 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); |
259 }; | 266 }; |
260 | 267 |
261 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ | 268 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_ |
OLD | NEW |