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_RESOURCE_MSG_FILTER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_ |
6 #define CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_ | 6 #define CHROME_BROWSER_RENDERER_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" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 base::ProcessHandle renderer_handle() const { return render_handle_;} | 76 base::ProcessHandle renderer_handle() const { return render_handle_;} |
77 | 77 |
78 // NotificationObserver implementation. | 78 // NotificationObserver implementation. |
79 virtual void Observe(NotificationType type, | 79 virtual void Observe(NotificationType type, |
80 const NotificationSource& source, | 80 const NotificationSource& source, |
81 const NotificationDetails& details); | 81 const NotificationDetails& details); |
82 | 82 |
83 private: | 83 private: |
84 void OnMsgCreateWindow(int opener_id, bool user_gesture, int* route_id, | 84 void OnMsgCreateWindow(int opener_id, bool user_gesture, int* route_id, |
85 HANDLE* modal_dialog_event); | 85 ModalDialogEvent* modal_dialog_event); |
86 void OnMsgCreateWidget(int opener_id, bool activatable, int* route_id); | 86 void OnMsgCreateWidget(int opener_id, bool activatable, int* route_id); |
87 void OnRequestResource(const IPC::Message& msg, int request_id, | 87 void OnRequestResource(const IPC::Message& msg, int request_id, |
88 const ViewHostMsg_Resource_Request& request); | 88 const ViewHostMsg_Resource_Request& request); |
89 void OnCancelRequest(int request_id); | 89 void OnCancelRequest(int request_id); |
90 void OnClosePageACK(int new_render_process_host_id, int new_request_id); | 90 void OnClosePageACK(int new_render_process_host_id, int new_request_id); |
91 void OnDataReceivedACK(int request_id); | 91 void OnDataReceivedACK(int request_id); |
92 void OnUploadProgressACK(int request_id); | 92 void OnUploadProgressACK(int request_id); |
93 void OnSyncLoad(int request_id, | 93 void OnSyncLoad(int request_id, |
94 const ViewHostMsg_Resource_Request& request, | 94 const ViewHostMsg_Resource_Request& request, |
95 IPC::Message* result_message); | 95 IPC::Message* result_message); |
(...skipping 12 matching lines...) Expand all Loading... |
108 const std::wstring& title, | 108 const std::wstring& title, |
109 const std::wstring& filter, | 109 const std::wstring& filter, |
110 uint32 user_data); | 110 uint32 user_data); |
111 | 111 |
112 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
113 // Cache fonts for the renderer. See ResourceMessageFilter::OnLoadFont | 113 // Cache fonts for the renderer. See ResourceMessageFilter::OnLoadFont |
114 // implementation for more details | 114 // implementation for more details |
115 void OnLoadFont(LOGFONT font); | 115 void OnLoadFont(LOGFONT font); |
116 #endif | 116 #endif |
117 | 117 |
118 void OnGetScreenInfo(gfx::NativeView window, | 118 void OnGetScreenInfo(gfx::NativeViewId window, |
119 webkit_glue::ScreenInfo* results); | 119 webkit_glue::ScreenInfo* results); |
120 void OnGetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); | 120 void OnGetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); |
121 void OnGetPluginPath(const GURL& url, | 121 void OnGetPluginPath(const GURL& url, |
122 const std::string& mime_type, | 122 const std::string& mime_type, |
123 const std::string& clsid, | 123 const std::string& clsid, |
124 FilePath* filename, | 124 FilePath* filename, |
125 std::string* actual_mime_type); | 125 std::string* actual_mime_type); |
126 void OnOpenChannelToPlugin(const GURL& url, | 126 void OnOpenChannelToPlugin(const GURL& url, |
127 const std::string& mime_type, | 127 const std::string& mime_type, |
128 const std::string& clsid, | 128 const std::string& clsid, |
129 const std::wstring& locale, | 129 const std::wstring& locale, |
130 IPC::Message* reply_msg); | 130 IPC::Message* reply_msg); |
131 void OnDownloadUrl(const IPC::Message& message, | 131 void OnDownloadUrl(const IPC::Message& message, |
132 const GURL& url, | 132 const GURL& url, |
133 const GURL& referrer); | 133 const GURL& referrer); |
134 void OnSpellCheck(const std::wstring& word, | 134 void OnSpellCheck(const std::wstring& word, |
135 IPC::Message* reply_msg); | 135 IPC::Message* reply_msg); |
136 void OnDnsPrefetch(const std::vector<std::string>& hostnames); | 136 void OnDnsPrefetch(const std::vector<std::string>& hostnames); |
137 void OnReceiveContextMenuMsg(const IPC::Message& msg); | 137 void OnReceiveContextMenuMsg(const IPC::Message& msg); |
138 // Clipboard messages | 138 // Clipboard messages |
139 void OnClipboardWriteObjects(const Clipboard::ObjectMap& objects); | 139 void OnClipboardWriteObjects(const Clipboard::ObjectMap& objects); |
140 void OnClipboardIsFormatAvailable(unsigned int format, bool* result); | 140 void OnClipboardIsFormatAvailable(unsigned int format, bool* result); |
141 void OnClipboardReadText(std::wstring* result); | 141 void OnClipboardReadText(std::wstring* result); |
142 void OnClipboardReadAsciiText(std::string* result); | 142 void OnClipboardReadAsciiText(std::string* result); |
143 void OnClipboardReadHTML(std::wstring* markup, GURL* src_url); | 143 void OnClipboardReadHTML(std::wstring* markup, GURL* src_url); |
144 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
145 void OnGetWindowRect(HWND window, gfx::Rect *rect); | 145 void OnGetWindowRect(gfx::NativeViewId window, gfx::Rect *rect); |
146 void OnGetRootWindowRect(HWND window, gfx::Rect *rect); | 146 void OnGetRootWindowRect(gfx::NativeViewId window, gfx::Rect *rect); |
147 void OnGetRootWindowResizerRect(HWND window, gfx::Rect *rect); | 147 void OnGetRootWindowResizerRect(gfx::NativeViewId window, gfx::Rect *rect); |
148 #endif | 148 #endif |
149 void OnGetMimeTypeFromExtension(const std::wstring& ext, | 149 void OnGetMimeTypeFromExtension(const std::wstring& ext, |
150 std::string* mime_type); | 150 std::string* mime_type); |
151 void OnGetMimeTypeFromFile(const std::wstring& file_path, | 151 void OnGetMimeTypeFromFile(const std::wstring& file_path, |
152 std::string* mime_type); | 152 std::string* mime_type); |
153 void OnGetPreferredExtensionForMimeType(const std::string& mime_type, | 153 void OnGetPreferredExtensionForMimeType(const std::string& mime_type, |
154 std::wstring* ext); | 154 std::wstring* ext); |
155 void OnGetCPBrowsingContext(uint32* context); | 155 void OnGetCPBrowsingContext(uint32* context); |
156 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 156 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
157 base::SharedMemoryHandle* browser_handle); | 157 base::SharedMemoryHandle* browser_handle); |
158 void OnResourceTypeStats(const CacheManager::ResourceTypeStats& stats); | 158 void OnResourceTypeStats(const CacheManager::ResourceTypeStats& stats); |
159 | 159 |
160 // A javascript code requested to print the current page. This is done in two | 160 // A javascript code requested to print the current page. This is done in two |
161 // steps and this is the first step. Get the print setting right here | 161 // steps and this is the first step. Get the print setting right here |
162 // synchronously. It will hang the I/O completely. | 162 // synchronously. It will hang the I/O completely. |
163 void OnGetDefaultPrintSettings(IPC::Message* reply_msg); | 163 void OnGetDefaultPrintSettings(IPC::Message* reply_msg); |
164 void OnGetDefaultPrintSettingsReply( | 164 void OnGetDefaultPrintSettingsReply( |
165 scoped_refptr<printing::PrinterQuery> printer_query, | 165 scoped_refptr<printing::PrinterQuery> printer_query, |
166 IPC::Message* reply_msg); | 166 IPC::Message* reply_msg); |
167 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
168 // A javascript code requested to print the current page. The renderer host | 168 // A javascript code requested to print the current page. The renderer host |
169 // have to show to the user the print dialog and returns the selected print | 169 // have to show to the user the print dialog and returns the selected print |
170 // settings. | 170 // settings. |
171 void OnScriptedPrint(HWND host_window, | 171 void OnScriptedPrint(gfx::NativeViewId host_window, |
172 int cookie, | 172 int cookie, |
173 int expected_pages_count, | 173 int expected_pages_count, |
174 IPC::Message* reply_msg); | 174 IPC::Message* reply_msg); |
175 void OnScriptedPrintReply( | 175 void OnScriptedPrintReply( |
176 scoped_refptr<printing::PrinterQuery> printer_query, | 176 scoped_refptr<printing::PrinterQuery> printer_query, |
177 IPC::Message* reply_msg); | 177 IPC::Message* reply_msg); |
178 #endif | 178 #endif |
179 | 179 |
180 // We have our own clipboard service because we want to access the clipboard | 180 // We have our own clipboard service because we want to access the clipboard |
181 // on the IO thread instead of forwarding (possibly synchronous) messages to | 181 // on the IO thread instead of forwarding (possibly synchronous) messages to |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // This is void* to prevent people from accidentally dereferencing it. | 219 // This is void* to prevent people from accidentally dereferencing it. |
220 // When registering for observers, cast to Profile*. | 220 // When registering for observers, cast to Profile*. |
221 void* profile_; | 221 void* profile_; |
222 | 222 |
223 scoped_refptr<RenderWidgetHelper> render_widget_helper_; | 223 scoped_refptr<RenderWidgetHelper> render_widget_helper_; |
224 | 224 |
225 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); | 225 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); |
226 }; | 226 }; |
227 | 227 |
228 #endif // CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_ | 228 #endif // CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_ |
OLD | NEW |