Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: chrome/common/render_messages_internal.h

Issue 6646005: Creates the ipclist utility that chrome security team has wanted to dump... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <map>
6 #include <set>
7 #include <string>
8 #include <vector>
9
10 #include "build/build_config.h"
11
12 #include "base/file_path.h"
13 #include "base/nullable_string16.h"
14 #include "base/platform_file.h"
15 #include "base/sync_socket.h"
16 #include "chrome/common/content_settings.h"
17 #include "chrome/common/extensions/extension.h"
18 #include "chrome/common/geoposition.h"
19 #include "chrome/common/nacl_types.h"
20 #include "chrome/common/notification_type.h"
21 #include "chrome/common/page_zoom.h"
22 #include "chrome/common/translate_errors.h"
23 #include "chrome/common/window_container_type.h"
24 #include "ipc/ipc_message_macros.h"
25 #include "media/audio/audio_buffers_state.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
29 #include "webkit/glue/context_menu.h"
30 #include "webkit/glue/webdropdata.h"
31 #include "webkit/plugins/npapi/webplugininfo.h"
32
33 #if defined(OS_POSIX)
34 #include "base/file_descriptor_posix.h"
35 #endif
36
37 #if defined(OS_MACOSX)
38 #include "chrome/common/font_descriptor_mac.h"
39 #endif
40
41 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
42 // more sense with our current design.
43
44 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
45 // to typedef it to avoid that.
46 // Substitution map for l10n messages.
47 typedef std::map<std::string, std::string> SubstitutionMap;
48
49 class Value;
50 class SkBitmap;
51 class WebCursor;
52 struct GPUInfo;
53 struct ThumbnailScore;
54
55 namespace gfx {
56 class Rect;
57 }
58
59 namespace IPC {
60 struct ChannelHandle;
61 class Message;
62 }
63
64 namespace webkit_blob {
65 class BlobData;
66 }
67
68 namespace file_util {
69 struct FileInfo;
70 }
71
72 #define IPC_MESSAGE_START ViewMsgStart
73
74 //-----------------------------------------------------------------------------
75 // RenderView messages
76 // These are messages sent from the browser to the renderer process.
77
78 // Used typically when recovering from a crash. The new rendering process
79 // sets its global "next page id" counter to the given value.
80 IPC_MESSAGE_CONTROL1(ViewMsg_SetNextPageID,
81 int32 /* next_page_id */)
82
83 // Sends System Colors corresponding to a set of CSS color keywords
84 // down the pipe.
85 // This message must be sent to the renderer immediately on launch
86 // before creating any new views.
87 // The message can also be sent during a renderer's lifetime if system colors
88 // are updated.
89 // TODO(jeremy): Possibly change IPC format once we have this all hooked up.
90 IPC_MESSAGE_ROUTED1(ViewMsg_SetCSSColors,
91 std::vector<CSSColors::CSSColorMapping>)
92
93 // Asks the browser for a unique routing ID.
94 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
95 int /* routing_id */)
96
97 // Tells the renderer to create a new view.
98 // This message is slightly different, the view it takes (via
99 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
100 // non-view control message.
101 IPC_MESSAGE_CONTROL1(ViewMsg_New,
102 ViewMsg_New_Params)
103
104 // Tells the renderer to set its maximum cache size to the supplied value.
105 IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities,
106 size_t /* min_dead_capacity */,
107 size_t /* max_dead_capacity */,
108 size_t /* capacity */)
109
110 // Tells the renderer to clear the cache.
111 IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache)
112
113 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
114 // similar to the new command, but used when the renderer created a view
115 // first, and we need to update it.
116 IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK,
117 gfx::NativeViewId /* parent_hwnd */)
118
119 // Sends updated preferences to the renderer.
120 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
121 RendererPreferences)
122
123 // Tells the renderer to perform the given action on the media player
124 // located at the given point.
125 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
126 gfx::Point, /* location */
127 WebKit::WebMediaPlayerAction)
128
129 IPC_MESSAGE_ROUTED0(ViewMsg_PrintNodeUnderContextMenu)
130
131 // Tells the renderer to print the print preview tab's PDF plugin without
132 // showing the print dialog.
133 IPC_MESSAGE_ROUTED1(ViewMsg_PrintForPrintPreview,
134 DictionaryValue /* settings*/)
135
136 // Tells the render view to close.
137 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
138
139 // Tells the render view to change its size. A ViewHostMsg_PaintRect message
140 // is generated in response provided new_size is not empty and not equal to
141 // the view's current size. The generated ViewHostMsg_PaintRect message will
142 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
143 // we don't have to fetch it every time WebKit asks for it.
144 IPC_MESSAGE_ROUTED2(ViewMsg_Resize,
145 gfx::Size /* new_size */,
146 gfx::Rect /* resizer_rect */)
147
148 // Sent to inform the view that it was hidden. This allows it to reduce its
149 // resource utilization.
150 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
151
152 // Tells the render view that it is no longer hidden (see WasHidden), and the
153 // render view is expected to respond with a full repaint if needs_repainting
154 // is true. In that case, the generated ViewHostMsg_PaintRect message will
155 // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
156 // message does not trigger a message in response.
157 IPC_MESSAGE_ROUTED1(ViewMsg_WasRestored,
158 bool /* needs_repainting */)
159
160 // Tells the render view to capture a thumbnail image of the page. The
161 // render view responds with a ViewHostMsg_Thumbnail.
162 IPC_MESSAGE_ROUTED0(ViewMsg_CaptureThumbnail)
163
164 // Tells the render view to capture a thumbnail image of the page. The
165 // render view responds with a ViewHostMsg_Snapshot.
166 IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot)
167
168 // Tells the render view to switch the CSS to print media type, renders every
169 // requested pages and switch back the CSS to display media type.
170 IPC_MESSAGE_ROUTED0(ViewMsg_PrintPages)
171
172 // Tells the render view that printing is done so it can clean up.
173 IPC_MESSAGE_ROUTED2(ViewMsg_PrintingDone,
174 int /* document_cookie */,
175 bool /* success */)
176
177 // Tells the render view to switch the CSS to print media type, renders every
178 // requested pages for print preview.
179 IPC_MESSAGE_ROUTED0(ViewMsg_PrintPreview)
180
181 // Sends back to the browser the rendered "printed document" for preview that
182 // was requested by a ViewMsg_PrintPreview message. The memory handle in this
183 // message is already valid in the browser process.
184 IPC_MESSAGE_ROUTED1(ViewHostMsg_PagesReadyForPreview,
185 ViewHostMsg_DidPreviewDocument_Params /* params */)
186
187 // Tells the renderer to dump as much memory as it can, perhaps because we
188 // have memory pressure or the renderer is (or will be) paged out. This
189 // should only result in purging objects we can recalculate, e.g. caches or
190 // JS garbage, not in purging irreplaceable objects.
191 IPC_MESSAGE_CONTROL0(ViewMsg_PurgeMemory)
192
193 // Sent to render the view into the supplied transport DIB, resize
194 // the web widget to match the |page_size|, scale it by the
195 // appropriate scale to make it fit the |desired_size|, and return
196 // it. In response to this message, the host generates a
197 // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
198 // the right size to receive an RGBA image at the |desired_size|.
199 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
200 // identify the PaintAtSize message the ACK belongs to.
201 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize,
202 TransportDIB::Handle /* dib_handle */,
203 int /* tag */,
204 gfx::Size /* page_size */,
205 gfx::Size /* desired_size */)
206
207 // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
208 // This signals the render view that it can send another UpdateRect message.
209 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK)
210
211 // Message payload includes:
212 // 1. A blob that should be cast to WebInputEvent
213 // 2. An optional boolean value indicating if a RawKeyDown event is associated
214 // to a keyboard shortcut of the browser.
215 IPC_MESSAGE_ROUTED0(ViewMsg_HandleInputEvent)
216
217 // This message notifies the renderer that the next key event is bound to one
218 // or more pre-defined edit commands. If the next key event is not handled
219 // by webkit, the specified edit commands shall be executed against current
220 // focused frame.
221 // Parameters
222 // * edit_commands (see chrome/common/edit_command_types.h)
223 // Contains one or more edit commands.
224 // See third_party/WebKit/Source/WebCore/editing/EditorCommand.cpp for detailed
225 // definition of webkit edit commands.
226 //
227 // This message must be sent just before sending a key event.
228 IPC_MESSAGE_ROUTED1(ViewMsg_SetEditCommandsForNextKeyEvent,
229 std::vector<EditCommand> /* edit_commands */)
230
231 // Message payload is the name/value of a WebCore edit command to execute.
232 IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand,
233 std::string, /* name */
234 std::string /* value */)
235
236 IPC_MESSAGE_ROUTED0(ViewMsg_MouseCaptureLost)
237
238 // TODO(darin): figure out how this meshes with RestoreFocus
239 IPC_MESSAGE_ROUTED1(ViewMsg_SetFocus, bool /* enable */)
240
241 // Tells the renderer to focus the first (last if reverse is true) focusable
242 // node.
243 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, bool /* reverse */)
244
245 // Tells the renderer to scroll the currently focused node into view only if
246 // the currently focused node is a Text node (textfield, text area or content
247 // editable divs).
248 IPC_MESSAGE_ROUTED0(ViewMsg_ScrollFocusedEditableNodeIntoView)
249
250 // Tells the renderer to perform the specified navigation, interrupting any
251 // existing navigation.
252 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params)
253
254 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
255
256 // Tells the renderer to reload the current focused frame
257 IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame)
258
259 // This message notifies the renderer that the user has closed the FindInPage
260 // window (and what action to take regarding the selection).
261 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
262 ViewMsg_StopFinding_Params /* action */)
263
264 // These messages are typically generated from context menus and request the
265 // renderer to apply the specified operation to the current selection.
266 IPC_MESSAGE_ROUTED0(ViewMsg_Undo)
267 IPC_MESSAGE_ROUTED0(ViewMsg_Redo)
268 IPC_MESSAGE_ROUTED0(ViewMsg_Cut)
269 IPC_MESSAGE_ROUTED0(ViewMsg_Copy)
270 #if defined(OS_MACOSX)
271 IPC_MESSAGE_ROUTED0(ViewMsg_CopyToFindPboard)
272 #endif
273 IPC_MESSAGE_ROUTED0(ViewMsg_Paste)
274 // Replaces the selected region or a word around the cursor with the
275 // specified string.
276 IPC_MESSAGE_ROUTED1(ViewMsg_Replace, string16)
277 IPC_MESSAGE_ROUTED0(ViewMsg_ToggleSpellCheck)
278 IPC_MESSAGE_ROUTED0(ViewMsg_Delete)
279 IPC_MESSAGE_ROUTED0(ViewMsg_SelectAll)
280 IPC_MESSAGE_ROUTED1(ViewMsg_ToggleSpellPanel, bool)
281 IPC_MESSAGE_ROUTED3(ViewMsg_SpellChecker_RespondTextCheck,
282 int /* request identifier given by WebKit */,
283 int /* document tag */,
284 std::vector<WebKit::WebTextCheckingResult>)
285
286 // This message tells the renderer to advance to the next misspelling. It is
287 // sent when the user clicks the "Find Next" button on the spelling panel.
288 IPC_MESSAGE_ROUTED0(ViewMsg_AdvanceToNextMisspelling)
289
290 // Copies the image at location x, y to the clipboard (if there indeed is an
291 // image at that location).
292 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
293 int /* x */,
294 int /* y */)
295
296 // History system notification that the visited link database has been
297 // replaced. It has one SharedMemoryHandle argument consisting of the table
298 // handle. This handle is valid in the context of the renderer
299 IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_NewTable, base::SharedMemoryHandle)
300
301 // History system notification that a link has been added and the link
302 // coloring state for the given hash must be re-calculated.
303 IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_Add, std::vector<uint64>)
304
305 // History system notification that one or more history items have been
306 // deleted, which at this point means that all link coloring state must be
307 // re-calculated.
308 IPC_MESSAGE_CONTROL0(ViewMsg_VisitedLink_Reset)
309
310 // Notification that the user scripts have been updated. It has one
311 // SharedMemoryHandle argument consisting of the pickled script data. This
312 // handle is valid in the context of the renderer.
313 IPC_MESSAGE_CONTROL1(ViewMsg_UserScripts_UpdatedScripts,
314 base::SharedMemoryHandle)
315
316 // Sent when the user wants to search for a word on the page (find in page).
317 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
318 int /* request_id */,
319 string16 /* search_text */,
320 WebKit::WebFindOptions)
321
322 // Send from the renderer to the browser to return the script running result.
323 IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteCodeFinished,
324 int, /* request id */
325 bool /* whether the script ran successfully */)
326
327 // Sent when user prompting is required before a ViewHostMsg_GetCookies
328 // message can complete. This message indicates that the renderer should
329 // pump messages while waiting for cookies.
330 IPC_MESSAGE_CONTROL0(ViewMsg_SignalCookiePromptEvent)
331
332 // Request for the renderer to evaluate an xpath to a frame and execute a
333 // javascript: url in that frame's context. The message is completely
334 // asynchronous and no corresponding response message is sent back.
335 //
336 // frame_xpath contains the modified xpath notation to identify an inner
337 // subframe (starting from the root frame). It is a concatenation of
338 // number of smaller xpaths delimited by '\n'. Each chunk in the string can
339 // be evaluated to a frame in its parent-frame's context.
340 //
341 // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
342 // can be broken into 3 xpaths
343 // /html/body/iframe evaluates to an iframe within the root frame
344 // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
345 // /frameset/frame[0] evaluates to first frame within the level-2 iframe
346 //
347 // jscript_url is the string containing the javascript: url to be executed
348 // in the target frame's context. The string should start with "javascript:"
349 // and continue with a valid JS text.
350 //
351 // If the fourth parameter is true the result is sent back to the renderer
352 // using the message ViewHostMsg_ScriptEvalResponse.
353 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
354 // client can uniquely identify the request.
355 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
356 string16, /* frame_xpath */
357 string16, /* jscript_url */
358 int, /* ID */
359 bool /* If true, result is sent back. */)
360
361 // Request for the renderer to evaluate an xpath to a frame and insert css
362 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
363 // allowed xpath expressions.
364 IPC_MESSAGE_ROUTED3(ViewMsg_CSSInsertRequest,
365 std::wstring, /* frame_xpath */
366 std::string, /* css string */
367 std::string /* element id */)
368
369 // Log a message to the console of the target frame
370 IPC_MESSAGE_ROUTED3(ViewMsg_AddMessageToConsole,
371 string16 /* frame_xpath */,
372 string16 /* message */,
373 WebKit::WebConsoleMessage::Level /* message_level */)
374
375 // RenderViewHostDelegate::RenderViewCreated method sends this message to a
376 // new renderer to notify it that it will host developer tools UI and should
377 // set up all neccessary bindings and create DevToolsClient instance that
378 // will handle communication with inspected page DevToolsAgent.
379 IPC_MESSAGE_ROUTED0(ViewMsg_SetupDevToolsClient)
380
381 // Change the zoom level for the current main frame. If the level actually
382 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
383 // telling it what url got zoomed and what its current zoom level is.
384 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
385 PageZoom::Function /* function */)
386
387 // Set the zoom level for the current main frame. If the level actually
388 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
389 // telling it what url got zoomed and what its current zoom level is.
390 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel,
391 double /* zoom_level */)
392
393 // Set the zoom level for a particular url that the renderer is in the
394 // process of loading. This will be stored, to be used if the load commits
395 // and ignored otherwise.
396 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
397 GURL /* url */,
398 double /* zoom_level */)
399
400 // Set the zoom level for a particular url, so all render views
401 // displaying this url can update their zoom levels to match.
402 IPC_MESSAGE_CONTROL2(ViewMsg_SetZoomLevelForCurrentURL,
403 GURL /* url */,
404 double /* zoom_level */)
405
406 // Set the content settings for a particular url that the renderer is in the
407 // process of loading. This will be stored, to be used if the load commits
408 // and ignored otherwise.
409 IPC_MESSAGE_ROUTED2(ViewMsg_SetContentSettingsForLoadingURL,
410 GURL /* url */,
411 ContentSettings /* content_settings */)
412
413 // Set the content settings for a particular url, so all render views
414 // displaying this host url update their content settings to match.
415 IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL,
416 GURL /* url */,
417 ContentSettings /* content_settings */)
418
419 // Change encoding of page in the renderer.
420 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
421 std::string /*new encoding name*/)
422
423 // Reset encoding of page in the renderer back to default.
424 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
425
426 // Requests the renderer to reserve a range of page ids.
427 IPC_MESSAGE_ROUTED1(ViewMsg_ReservePageIDRange,
428 int /* size_of_range */)
429
430 // D&d drop target messages.
431 IPC_MESSAGE_ROUTED4(ViewMsg_DragTargetDragEnter,
432 WebDropData /* drop_data */,
433 gfx::Point /* client_pt */,
434 gfx::Point /* screen_pt */,
435 WebKit::WebDragOperationsMask /* ops_allowed */)
436 IPC_MESSAGE_ROUTED3(ViewMsg_DragTargetDragOver,
437 gfx::Point /* client_pt */,
438 gfx::Point /* screen_pt */,
439 WebKit::WebDragOperationsMask /* ops_allowed */)
440 IPC_MESSAGE_ROUTED0(ViewMsg_DragTargetDragLeave)
441 IPC_MESSAGE_ROUTED2(ViewMsg_DragTargetDrop,
442 gfx::Point /* client_pt */,
443 gfx::Point /* screen_pt */)
444
445 // Notifies the renderer of updates in mouse position of an in-progress
446 // drag. if |ended| is true, then the user has ended the drag operation.
447 IPC_MESSAGE_ROUTED4(ViewMsg_DragSourceEndedOrMoved,
448 gfx::Point /* client_pt */,
449 gfx::Point /* screen_pt */,
450 bool /* ended */,
451 WebKit::WebDragOperation /* drag_operation */)
452
453 // Notifies the renderer that the system DoDragDrop call has ended.
454 IPC_MESSAGE_ROUTED0(ViewMsg_DragSourceSystemDragEnded)
455
456 // Used to tell a render view whether it should expose various bindings
457 // that allow JS content extended privileges. See BindingsPolicy for valid
458 // flag values.
459 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
460 int /* enabled_bindings_flags */)
461
462 // Tell the renderer to add a property to the WebUI binding object. This
463 // only works if we allowed WebUI bindings.
464 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
465 std::string /* property_name */,
466 std::string /* property_value_json */)
467
468 // This message starts/stop monitoring the input method status of the focused
469 // edit control of a renderer process.
470 // Parameters
471 // * is_active (bool)
472 // Indicates if an input method is active in the browser process.
473 // The possible actions when a renderer process receives this message are
474 // listed below:
475 // Value Action
476 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
477 // to notify the input method status of the focused edit control.
478 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
479 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
480 bool /* is_active */)
481
482 // This message sends a string being composed with an input method.
483 IPC_MESSAGE_ROUTED4(
484 ViewMsg_ImeSetComposition,
485 string16, /* text */
486 std::vector<WebKit::WebCompositionUnderline>, /* underlines */
487 int, /* selectiont_start */
488 int /* selection_end */)
489
490 // This message confirms an ongoing composition.
491 IPC_MESSAGE_ROUTED1(ViewMsg_ImeConfirmComposition,
492 string16 /* text */)
493
494 // This passes a set of webkit preferences down to the renderer.
495 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, WebPreferences)
496
497 // Used to notify the render-view that the browser has received a reply for
498 // the Find operation and is interested in receiving the next one. This is
499 // used to prevent the renderer from spamming the browser process with
500 // results.
501 IPC_MESSAGE_ROUTED0(ViewMsg_FindReplyACK)
502
503 // Used to notify the render-view that we have received a target URL. Used
504 // to prevent target URLs spamming the browser.
505 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
506
507 // Sets the alternate error page URL (link doctor) for the renderer process.
508 IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL, GURL)
509
510 // Install the first missing pluign.
511 IPC_MESSAGE_ROUTED0(ViewMsg_InstallMissingPlugin)
512
513 // Tells the renderer to empty its plugin list cache, optional reloading
514 // pages containing plugins.
515 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
516 bool /* reload_pages */)
517
518 // Tells the render view to load all blocked plugins.
519 IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins)
520
521 // Tells the render view a prerendered page is about to be displayed.
522 IPC_MESSAGE_ROUTED0(ViewMsg_DisplayPrerenderedPage)
523
524 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
525 std::vector<FilePath> /* selected files */)
526
527 // Used to instruct the RenderView to go into "view source" mode.
528 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
529
530 // Get all savable resource links from current webpage, include main
531 // frame and sub-frame.
532 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
533 GURL /* url of page which is needed to save */)
534
535 // Get html data by serializing all frames of current page with lists
536 // which contain all resource links that have local copy.
537 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
538 std::vector<GURL> /* urls that have local copy */,
539 std::vector<FilePath> /* paths of local copy */,
540 FilePath /* local directory path */)
541
542 // Requests application info for the page. The renderer responds back with
543 // ViewHostMsg_DidGetApplicationInfo.
544 IPC_MESSAGE_ROUTED1(ViewMsg_GetApplicationInfo, int32 /*page_id*/)
545
546 // Requests the renderer to download the specified favicon image encode it as
547 // PNG and send the PNG data back ala ViewHostMsg_DidDownloadFavIcon.
548 IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavIcon,
549 int /* identifier for the request */,
550 GURL /* URL of the image */,
551 int /* Size of the image. Normally 0, but set if you have
552 a preferred image size to request, such as when
553 downloading the favicon */)
554
555 // When a renderer sends a ViewHostMsg_Focus to the browser process,
556 // the browser has the option of sending a ViewMsg_CantFocus back to
557 // the renderer.
558 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
559
560 // Instructs the renderer to invoke the frame's shouldClose method, which
561 // runs the onbeforeunload event handler. Expects the result to be returned
562 // via ViewHostMsg_ShouldClose.
563 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose)
564
565 // Instructs the renderer to close the current page, including running the
566 // onunload event handler. See the struct in render_messages.h for more.
567 //
568 // Expects a ClosePage_ACK message when finished, where the parameters are
569 // echoed back.
570 IPC_MESSAGE_ROUTED1(ViewMsg_ClosePage,
571 ViewMsg_ClosePage_Params)
572
573 // Asks the renderer to send back stats on the WebCore cache broken down by
574 // resource types.
575 IPC_MESSAGE_CONTROL0(ViewMsg_GetCacheResourceStats)
576
577 // Asks the renderer to send back Histograms.
578 IPC_MESSAGE_CONTROL1(ViewMsg_GetRendererHistograms,
579 int /* sequence number of Renderer Histograms. */)
580
581 #if defined(USE_TCMALLOC)
582 // Asks the renderer to send back tcmalloc stats.
583 IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc)
584 #endif
585
586 // Asks the renderer to send back V8 heap stats.
587 IPC_MESSAGE_CONTROL0(ViewMsg_GetV8HeapStats)
588
589 // Notifies the renderer about ui theme changes
590 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
591
592 // Notifies the renderer that a paint is to be generated for the rectangle
593 // passed in.
594 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
595 gfx::Size /* The view size to be repainted */)
596
597 // Posts a message to the renderer.
598 IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
599 std::string /* The message */,
600 std::string /* The origin */,
601 std::string /* The target*/)
602
603 // Sent to the renderer when a popup window should no longer count against
604 // the current popup count (either because it's not a popup or because it was
605 // a generated by a user action or because a constrained popup got turned
606 // into a full window).
607 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
608
609 // The browser sends this to a renderer process in response to a
610 // GpuHostMsg_EstablishGpuChannel message.
611 IPC_MESSAGE_CONTROL3(ViewMsg_GpuChannelEstablished,
612 IPC::ChannelHandle /* handle to channel */,
613 base::ProcessHandle /* renderer_process_for_gpu */,
614 GPUInfo /* stats about GPU process*/)
615
616 // Notifies the renderer of the appcache that has been selected for a
617 // a particular host. This is sent in reply to AppCacheMsg_SelectCache.
618 IPC_MESSAGE_CONTROL2(AppCacheMsg_CacheSelected,
619 int /* host_id */,
620 appcache::AppCacheInfo)
621
622 // Notifies the renderer of an AppCache status change.
623 IPC_MESSAGE_CONTROL2(AppCacheMsg_StatusChanged,
624 std::vector<int> /* host_ids */,
625 appcache::Status)
626
627 // Notifies the renderer of an AppCache event other than the
628 // progress event which has a seperate message.
629 IPC_MESSAGE_CONTROL2(AppCacheMsg_EventRaised,
630 std::vector<int> /* host_ids */,
631 appcache::EventID)
632
633 // Notifies the renderer of an AppCache progress event.
634 IPC_MESSAGE_CONTROL4(AppCacheMsg_ProgressEventRaised,
635 std::vector<int> /* host_ids */,
636 GURL /* url being processed */,
637 int /* total */,
638 int /* complete */)
639
640 // Notifies the renderer of an AppCache error event.
641 IPC_MESSAGE_CONTROL2(AppCacheMsg_ErrorEventRaised,
642 std::vector<int> /* host_ids */,
643 std::string /* error_message */)
644
645 // Notifies the renderer of an AppCache logging message.
646 IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage,
647 int /* host_id */,
648 int /* log_level */,
649 std::string /* message */)
650
651 // Notifies the renderer of the fact that AppCache access was blocked.
652 IPC_MESSAGE_CONTROL2(AppCacheMsg_ContentBlocked,
653 int /* host_id */,
654 GURL /* manifest_url */)
655
656 // Sent by the Browser process to alert a window about whether a it should
657 // allow a scripted window.close(). The renderer assumes every new window is a
658 // blocked popup until notified otherwise.
659 IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose,
660 bool /* script_can_close */)
661
662 // Sent by AudioRendererHost to renderer to request an audio packet.
663 IPC_MESSAGE_ROUTED2(ViewMsg_RequestAudioPacket,
664 int /* stream id */,
665 AudioBuffersState)
666
667 // Tell the renderer process that the audio stream has been created, renderer
668 // process would be given a ShareMemoryHandle that it should write to from
669 // then on.
670 IPC_MESSAGE_ROUTED3(ViewMsg_NotifyAudioStreamCreated,
671 int /* stream id */,
672 base::SharedMemoryHandle /* handle */,
673 uint32 /* length */)
674
675 // Tell the renderer process that a low latency audio stream has been created,
676 // renderer process would be given a SyncSocket that it should write to from
677 // then on.
678 #if defined(OS_WIN)
679 IPC_MESSAGE_ROUTED4(ViewMsg_NotifyLowLatencyAudioStreamCreated,
680 int /* stream id */,
681 base::SharedMemoryHandle /* handle */,
682 base::SyncSocket::Handle /* socket handle */,
683 uint32 /* length */)
684 #else
685 IPC_MESSAGE_ROUTED4(ViewMsg_NotifyLowLatencyAudioStreamCreated,
686 int /* stream id */,
687 base::SharedMemoryHandle /* handle */,
688 base::FileDescriptor /* socket handle */,
689 uint32 /* length */)
690 #endif
691
692 // Notification message sent from AudioRendererHost to renderer for state
693 // update after the renderer has requested a Create/Start/Close.
694 IPC_MESSAGE_ROUTED2(ViewMsg_NotifyAudioStreamStateChanged,
695 int /* stream id */,
696 ViewMsg_AudioStreamState_Params /* new state */)
697
698 IPC_MESSAGE_ROUTED2(ViewMsg_NotifyAudioStreamVolume,
699 int /* stream id */,
700 double /* volume */)
701
702 // Notification that a move or resize renderer's containing window has
703 // started.
704 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
705
706 // The browser sends this message in response to all extension api calls.
707 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionResponse,
708 int /* request_id */,
709 bool /* success */,
710 std::string /* response */,
711 std::string /* error */)
712
713 // This message is optionally routed. If used as a control message, it
714 // will call a javascript function in every registered context in the
715 // target process. If routed, it will be restricted to the contexts that
716 // are part of the target RenderView.
717 // If |extension_id| is non-empty, the function will be invoked only in
718 // contexts owned by the extension. |args| is a list of primitive Value types
719 // that are passed to the function.
720 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionMessageInvoke,
721 std::string /* extension_id */,
722 std::string /* function_name */,
723 ListValue /* args */,
724 GURL /* event URL */)
725
726 // Tell the renderer process all known extension function names.
727 IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetFunctionNames,
728 std::vector<std::string>)
729
730 // TODO(aa): SetAPIPermissions, SetHostPermissions, and possibly
731 // UpdatePageActions should be replaced with just sending additional data in
732 // ExtensionLoaded. See: crbug.com/70516.
733
734 // Tell the renderer process which permissions the given extension has. See
735 // Extension::Permissions for which elements correspond to which permissions.
736 IPC_MESSAGE_CONTROL2(ViewMsg_Extension_SetAPIPermissions,
737 std::string /* extension_id */,
738 std::set<std::string> /* permissions */)
739
740 // Tell the renderer process which host permissions the given extension has.
741 IPC_MESSAGE_CONTROL2(
742 ViewMsg_Extension_SetHostPermissions,
743 GURL /* source extension's origin */,
744 std::vector<URLPattern> /* URLPatterns the extension can access */)
745
746 // Tell the renderer process all known page action ids for a particular
747 // extension.
748 IPC_MESSAGE_CONTROL2(ViewMsg_Extension_UpdatePageActions,
749 std::string /* extension_id */,
750 std::vector<std::string> /* page_action_ids */)
751
752 // Notifies the renderer that an extension was loaded in the browser.
753 IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionLoaded, ViewMsg_ExtensionLoaded_Params);
754
755 // Notifies the renderer that an extension was unloaded in the browser.
756 IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionUnloaded, std::string);
757
758 // Updates the scripting whitelist for extensions in the render process. This is
759 // only used for testing.
760 IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetScriptingWhitelist,
761 Extension::ScriptingWhitelist /* extenison ids */);
762
763 // Changes the text direction of the currently selected input field (if any).
764 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
765 WebKit::WebTextDirection /* direction */)
766
767 // Tells the renderer to clear the focused node (if any).
768 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode)
769
770 // Make the RenderView transparent and render it onto a custom background. The
771 // background will be tiled in both directions if it is not large enough.
772 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground,
773 SkBitmap /* background */)
774
775 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
776 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
777 // processed the move. The browser may have ignored the move, but it finished
778 // processing. This is used because the renderer keeps a temporary cache of
779 // the widget position while these asynchronous operations are in progress.
780 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
781
782 // Used to instruct the RenderView to send back updates to the preferred size.
783 IPC_MESSAGE_ROUTED1(ViewMsg_EnablePreferredSizeChangedMode, int /*flags*/)
784
785 IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange,
786 string16 /* value */,
787 bool /* verbatim */,
788 int /* selection_start */,
789 int /* selection_end */)
790 IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit,
791 string16 /* value */,
792 bool /* verbatim */)
793 IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel)
794 IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize,
795 gfx::Rect /* search_box_bounds */)
796 IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant,
797 string16 /* value*/,
798 bool /* verbatim */,
799 int /* selection_start */,
800 int /* selection_end */)
801
802 // Used to tell the renderer not to add scrollbars with height and
803 // width below a threshold.
804 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
805 gfx::Size /* disable_scrollbar_size_limit */)
806
807 // Used to inform the renderer that the browser has displayed its
808 // requested notification.
809 IPC_MESSAGE_ROUTED1(ViewMsg_PostDisplayToNotificationObject,
810 int /* notification_id */)
811
812 // Used to inform the renderer that the browser has encountered an error
813 // trying to display a notification.
814 IPC_MESSAGE_ROUTED2(ViewMsg_PostErrorToNotificationObject,
815 int /* notification_id */,
816 string16 /* message */)
817
818 // Informs the renderer that the one if its notifications has closed.
819 IPC_MESSAGE_ROUTED2(ViewMsg_PostCloseToNotificationObject,
820 int /* notification_id */,
821 bool /* by_user */)
822
823 // Informs the renderer that one of its notifications was clicked on.
824 IPC_MESSAGE_ROUTED1(ViewMsg_PostClickToNotificationObject,
825 int /* notification_id */)
826
827 // Informs the renderer that the one if its notifications has closed.
828 IPC_MESSAGE_ROUTED1(ViewMsg_PermissionRequestDone,
829 int /* request_id */)
830
831 // Activate/deactivate the RenderView (i.e., set its controls' tint
832 // accordingly, etc.).
833 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
834 bool /* active */)
835
836 #if defined(OS_MACOSX)
837 // Let the RenderView know its window has changed visibility.
838 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
839 bool /* visibile */)
840
841 // Let the RenderView know its window's frame has changed.
842 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
843 gfx::Rect /* window frame */,
844 gfx::Rect /* content view frame */)
845
846 // Tell the renderer that plugin IME has completed.
847 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
848 string16 /* text */,
849 int /* plugin_id */)
850 #endif
851
852 // Response message to ViewHostMsg_CreateShared/DedicatedWorker.
853 // Sent when the worker has started.
854 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
855
856 // Tell the renderer which browser window it's being attached to.
857 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateBrowserWindowId,
858 int /* id of browser window */)
859
860 // Tell the renderer which type this view is.
861 IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType,
862 ViewType::Type /* view_type */)
863
864 // Notification that renderer should run some JavaScript code.
865 IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode,
866 ViewMsg_ExecuteCode_Params)
867
868 // SpellChecker messages.
869
870 // Passes some initialization params to the renderer's spellchecker. This can
871 // be called directly after startup or in (async) response to a
872 // RequestDictionary ViewHost message.
873 IPC_MESSAGE_CONTROL4(ViewMsg_SpellChecker_Init,
874 IPC::PlatformFileForTransit /* bdict_file */,
875 std::vector<std::string> /* custom_dict_words */,
876 std::string /* language */,
877 bool /* auto spell correct */)
878
879 // A word has been added to the custom dictionary; update the local custom
880 // word list.
881 IPC_MESSAGE_CONTROL1(ViewMsg_SpellChecker_WordAdded,
882 std::string /* word */)
883
884 // Toggle the auto spell correct functionality.
885 IPC_MESSAGE_CONTROL1(ViewMsg_SpellChecker_EnableAutoSpellCorrect,
886 bool /* enable */)
887
888 // Executes custom context menu action that was provided from WebKit.
889 IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction,
890 webkit_glue::CustomContextMenuContext /* custom_context */,
891 unsigned /* action */)
892
893 // Tells the renderer to translate the page contents from one language to
894 // another.
895 IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage,
896 int /* page id */,
897 std::string, /* the script injected in the page */
898 std::string, /* BCP 47/RFC 5646 language code the page
899 is in */
900 std::string /* BCP 47/RFC 5646 language code to translate
901 to */)
902
903 // Tells the renderer to revert the text of translated page to its original
904 // contents.
905 IPC_MESSAGE_ROUTED1(ViewMsg_RevertTranslation,
906 int /* page id */)
907
908 // Reply in response to ViewHostMsg_Geolocation_RequestPermission.
909 IPC_MESSAGE_ROUTED2(ViewMsg_Geolocation_PermissionSet,
910 int /* bridge_id */,
911 bool /* is_allowed */)
912
913 // Sent after ViewHostMsg_Geolocation_StartUpdating iff the user has granted
914 // permission and we have a position available or an error occurs (such as
915 // permission denied, position unavailable, etc.)
916 IPC_MESSAGE_ROUTED1(ViewMsg_Geolocation_PositionUpdated,
917 Geoposition /* geoposition */)
918
919 // Sent on process startup to indicate whether this process is running in
920 // incognito mode.
921 IPC_MESSAGE_CONTROL1(ViewMsg_SetIsIncognitoProcess,
922 bool /* is_incognito_processs */)
923
924 // Enable accessibility in the renderer process.
925 IPC_MESSAGE_ROUTED0(ViewMsg_EnableAccessibility)
926
927 // Relay a request from assistive technology to set focus to a given node.
928 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityFocus,
929 int /* object id */)
930
931 // Relay a request from assistive technology to perform the default action
932 // on a given node.
933 IPC_MESSAGE_ROUTED1(ViewMsg_AccessibilityDoDefaultAction,
934 int /* object id */)
935
936 // Tells the render view that a ViewHostMsg_AccessibilityNotifications
937 // message was processed and it can send addition notifications.
938 IPC_MESSAGE_ROUTED0(ViewMsg_AccessibilityNotifications_ACK)
939
940 // Notification that the device's orientation has changed.
941 IPC_MESSAGE_ROUTED1(ViewMsg_DeviceOrientationUpdated,
942 ViewMsg_DeviceOrientationUpdated_Params)
943
944 // The response to ViewHostMsg_AsyncOpenFile.
945 IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK,
946 base::PlatformFileError /* error_code */,
947 IPC::PlatformFileForTransit /* file descriptor */,
948 int /* message_id */)
949
950 // A classification model for client-side phishing detection.
951 // The given file contains an encoded safe_browsing::ClientSideModel
952 // protocol buffer.
953 IPC_MESSAGE_CONTROL1(ViewMsg_SetPhishingModel,
954 IPC::PlatformFileForTransit /* model_file */)
955
956 // Request a DOM tree when a malware interstitial is shown.
957 IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails)
958
959 // Tells the renderer to begin phishing detection for the given toplevel URL
960 // which it has started loading.
961 IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
962
963 // External popup menus.
964 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
965 int /* selected index, -1 means no selection */)
966
967 // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
968 // the menu has been closed.
969 IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed,
970 webkit_glue::CustomContextMenuContext /* custom_context */)
971
972 // Tells the renderer that the network state has changed and that
973 // window.navigator.onLine should be updated for all WebViews.
974 IPC_MESSAGE_ROUTED1(ViewMsg_NetworkStateChanged,
975 bool /* online */)
976
977 //-----------------------------------------------------------------------------
978 // TabContents messages
979 // These are messages sent from the renderer to the browser process.
980
981 // Sent by the renderer when it is creating a new window. The browser creates
982 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
983 // MSG_ROUTING_NONE, the view couldn't be created.
984 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow,
985 ViewHostMsg_CreateWindow_Params,
986 int /* route_id */,
987 int64 /* cloned_session_storage_namespace_id */)
988
989 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
990 // <select> dropdowns. This message is sent to the TabContents that
991 // contains the widget being created.
992 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
993 int /* opener_id */,
994 WebKit::WebPopupType /* popup type */,
995 int /* route_id */)
996
997 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
998 // window.
999 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateFullscreenWidget,
1000 int /* opener_id */,
1001 int /* route_id */)
1002
1003 // These three messages are sent to the parent RenderViewHost to display the
1004 // page/widget that was created by
1005 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1006 // refers to the id that was returned from the Create message above.
1007 // The initial_position parameter is a rectangle in screen coordinates.
1008 //
1009 // FUTURE: there will probably be flags here to control if the result is
1010 // in a new window.
1011 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1012 int /* route_id */,
1013 WindowOpenDisposition /* disposition */,
1014 gfx::Rect /* initial_pos */,
1015 bool /* opened_by_user_gesture */)
1016
1017 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1018 int /* route_id */,
1019 gfx::Rect /* initial_pos */)
1020
1021 // Message to show a full screen widget.
1022 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1023 int /* route_id */)
1024
1025 // Message to show a popup menu using native cocoa controls (Mac only).
1026 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1027 ViewHostMsg_ShowPopup_Params)
1028
1029 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1030 // to run in a modal fashion until it is closed.
1031 IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
1032
1033 IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
1034 WebKit::WebCache::UsageStats /* stats */)
1035
1036 // Indicates the renderer is ready in response to a ViewMsg_New or
1037 // a ViewMsg_CreatingNew_ACK.
1038 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1039
1040
1041 // Indicates the renderer process is gone. This actually is sent by the
1042 // browser process to itself, but keeps the interface cleaner.
1043 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone,
1044 int, /* this really is base::TerminationStatus */
1045 int /* exit_code */)
1046
1047 // Sent by the renderer process to request that the browser close the view.
1048 // This corresponds to the window.close() API, and the browser may ignore
1049 // this message. Otherwise, the browser will generates a ViewMsg_Close
1050 // message to close the view.
1051 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1052
1053 // Sent by the renderer process to request that the browser move the view.
1054 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1055 // the browser may ignore this message.
1056 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1057 gfx::Rect /* position */)
1058
1059 // Notifies the browser that a frame in the view has changed. This message
1060 // has a lot of parameters and is packed/unpacked by functions defined in
1061 // render_messages.h.
1062 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
1063 ViewHostMsg_FrameNavigate_Params)
1064
1065 // Notifies the browser that we have session history information.
1066 // page_id: unique ID that allows us to distinguish between history entries.
1067 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1068 int32 /* page_id */,
1069 std::string /* state */)
1070
1071 // Notifies the browser that a document has been loaded in a frame.
1072 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
1073 int64 /* frame_id */)
1074
1075 // Notifies the browser that a frame finished loading.
1076 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFinishLoad,
1077 int64 /* frame_id */)
1078
1079 // Changes the title for the page in the UI when the page is navigated or the
1080 // title changes.
1081 // TODO(darin): use a UTF-8 string to reduce data size
1082 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle, int32, std::wstring)
1083
1084 // Changes the icon url for the page in the UI.
1085 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL, int32, GURL)
1086
1087 // Change the encoding name of the page in UI when the page has detected
1088 // proper encoding name.
1089 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
1090 std::string /* new encoding name */)
1091
1092 // Notifies the browser that we want to show a destination url for a potential
1093 // action (e.g. when the user is hovering over a link).
1094 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, int32, GURL)
1095
1096 // Sent when the renderer starts loading the page. This corresponds to
1097 // WebKit's notion of the throbber starting. Note that sometimes you may get
1098 // duplicates of these during a single load.
1099 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
1100
1101 // Sent when the renderer is done loading a page. This corresponds to WebKit's
1102 // notion of the throbber stopping.
1103 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
1104
1105 // Sent when the renderer main frame has made progress loading.
1106 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
1107 double /* load_progress */)
1108
1109 // Sent when the document element is available for the toplevel frame. This
1110 // happens after the page starts loading, but before all resources are
1111 // finished.
1112 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
1113
1114 // Sent when after the onload handler has been invoked for the document
1115 // in the toplevel frame.
1116 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
1117 int32 /* page_id */)
1118
1119 // Sent when the renderer loads a resource from its memory cache.
1120 // The security info is non empty if the resource was originally loaded over
1121 // a secure connection.
1122 // Note: May only be sent once per URL per frame per committed load.
1123 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
1124 GURL /* url */,
1125 std::string /* security info */)
1126
1127 // Sent when the renderer displays insecure content in a secure page.
1128 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1129
1130 // Sent when the renderer runs insecure content in a secure origin.
1131 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1132 std::string /* security_origin */,
1133 GURL /* target URL */);
1134
1135 // Sent when the renderer starts a provisional load for a frame.
1136 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidStartProvisionalLoadForFrame,
1137 int64 /* frame_id */,
1138 bool /* true if it is the main frame */,
1139 GURL /* url */)
1140
1141 // Sent when the renderer fails a provisional load with an error.
1142 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailProvisionalLoadWithError,
1143 int64 /* frame_id */,
1144 bool /* true if it is the main frame */,
1145 int /* error_code */,
1146 GURL /* url */,
1147 bool /* true if the failure is the result of
1148 navigating to a POST again and we're going to
1149 show the POST interstitial */)
1150
1151 // Tells the render view that a ViewHostMsg_PaintAtSize message was
1152 // processed, and the DIB is ready for use. |tag| has the same value that
1153 // the tag sent along with ViewMsg_PaintAtSize.
1154 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
1155 int /* tag */,
1156 gfx::Size /* size */)
1157
1158 // Sent to update part of the view. In response to this message, the host
1159 // generates a ViewMsg_UpdateRect_ACK message.
1160 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1161 ViewHostMsg_UpdateRect_Params)
1162
1163 // Sent by the renderer when accelerated compositing is enabled or disabled to
1164 // notify the browser whether or not is should do painting.
1165 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
1166 bool /* true if the accelerated compositor is actve */)
1167
1168 // Acknowledges receipt of a ViewMsg_HandleInputEvent message.
1169 // Payload is a WebInputEvent::Type which is the type of the event, followed
1170 // by an optional WebInputEvent which is provided only if the event was not
1171 // processed.
1172 IPC_MESSAGE_ROUTED0(ViewHostMsg_HandleInputEvent_ACK)
1173
1174 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1175 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1176
1177 // Message sent from renderer to the browser when focus changes inside the
1178 // webpage. The parameter says whether the newly focused element needs
1179 // keyboard input (true for textfields, text areas and content editable divs).
1180 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1181 bool /* is_editable_node */)
1182
1183 // Returns the window location of the given window.
1184 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1185 // HWND so that we can eliminate the NativeViewId parameter.
1186 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect,
1187 gfx::NativeViewId /* window */,
1188 gfx::Rect /* Out: Window location */)
1189
1190 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor)
1191 // Result of string search in the page.
1192 // Response to ViewMsg_Find with the results of the requested find-in-page
1193 // search, the number of matches found and the selection rect (in screen
1194 // coordinates) for the string found. If |final_update| is false, it signals
1195 // that this is not the last Find_Reply message - more will be sent as the
1196 // scoping effort continues.
1197 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1198 int /* request_id */,
1199 int /* number of matches */,
1200 gfx::Rect /* selection_rect */,
1201 int /* active_match_ordinal */,
1202 bool /* final_update */)
1203
1204 // Used to set a cookie. The cookie is set asynchronously, but will be
1205 // available to a subsequent ViewHostMsg_GetCookies request.
1206 IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
1207 GURL /* url */,
1208 GURL /* first_party_for_cookies */,
1209 std::string /* cookie */)
1210
1211 // Used to get cookies for the given URL. This may block waiting for a
1212 // previous SetCookie message to be processed.
1213 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
1214 GURL /* url */,
1215 GURL /* first_party_for_cookies */,
1216 std::string /* cookies */)
1217
1218 // Used to get raw cookie information for the given URL. This may block
1219 // waiting for a previous SetCookie message to be processed.
1220 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies,
1221 GURL /* url */,
1222 GURL /* first_party_for_cookies */,
1223 std::vector<webkit_glue::WebCookie>
1224 /* raw_cookies */)
1225
1226 // Used to delete cookie for the given URL and name
1227 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1228 GURL /* url */,
1229 std::string /* cookie_name */)
1230
1231 // Used to check if cookies are enabled for the given URL. This may block
1232 // waiting for a previous SetCookie message to be processed.
1233 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
1234 GURL /* url */,
1235 GURL /* first_party_for_cookies */,
1236 bool /* cookies_enabled */)
1237
1238 // Used to get the list of plugins
1239 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1240 bool /* refresh*/,
1241 std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
1242
1243 // Return information about a plugin for the given URL and MIME
1244 // type. If there is no matching plugin, |found| is false. If
1245 // |enabled| in the WebPluginInfo struct is false, the plug-in is
1246 // treated as if it was not installed at all.
1247 //
1248 // If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
1249 // blocked by the content settings for |policy_url|. It still
1250 // appears in navigator.plugins in Javascript though, and can be
1251 // loaded via click-to-play.
1252 //
1253 // If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
1254 // explicitly white-listed for the plug-in, or the user has chosen
1255 // not to block nonsandboxed plugins.
1256 //
1257 // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
1258 // neither blocked nor white-listed, which means that it's allowed
1259 // by default and can still be blocked if it's non-sandboxed.
1260 //
1261 // |actual_mime_type| is the actual mime type supported by the
1262 // plugin found that match the URL given (one for each item in
1263 // |info|).
1264 IPC_SYNC_MESSAGE_CONTROL4_4(ViewHostMsg_GetPluginInfo,
1265 int /* routing_id */,
1266 GURL /* url */,
1267 GURL /* policy_url */,
1268 std::string /* mime_type */,
1269 bool /* found */,
1270 webkit::npapi::WebPluginInfo /* plugin info */,
1271 ContentSetting /* setting */,
1272 std::string /* actual_mime_type */)
1273
1274 // Requests spellcheck for a word.
1275 IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
1276 string16 /* word to check */,
1277 int /* document tag*/,
1278 int /* misspell location */,
1279 int /* misspell length */)
1280
1281 // Asks the browser for a unique document tag.
1282 IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDocumentTag,
1283 int /* the tag */)
1284
1285
1286 // This message tells the spellchecker that a document, identified by an int
1287 // tag, has been closed and all of the ignored words for that document can be
1288 // forgotten.
1289 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentWithTagClosed,
1290 int /* the tag */)
1291
1292 // Tells the browser to display or not display the SpellingPanel
1293 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowSpellingPanel,
1294 bool /* if true, then show it, otherwise hide it*/)
1295
1296 // Tells the browser to update the spelling panel with the given word.
1297 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateSpellingPanelWithMisspelledWord,
1298 string16 /* the word to update the panel with */)
1299
1300 // Tells the browser that content in the current page was blocked due to the
1301 // user's content settings.
1302 IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
1303 ContentSettingsType, /* type of blocked content */
1304 std::string /* resource identifier */)
1305
1306 // Tells the browser that a specific Appcache manifest in the current page
1307 // was accessed.
1308 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1309 GURL /* manifest url */,
1310 bool /* blocked by policy */)
1311
1312 // Tells the browser that a specific Web database in the current page was
1313 // accessed.
1314 IPC_MESSAGE_ROUTED5(ViewHostMsg_WebDatabaseAccessed,
1315 GURL /* origin url */,
1316 string16 /* database name */,
1317 string16 /* database display name */,
1318 unsigned long /* estimated size */,
1319 bool /* blocked by policy */)
1320
1321 // Initiates a download based on user actions like 'ALT+click'.
1322 IPC_MESSAGE_ROUTED2(ViewHostMsg_DownloadUrl,
1323 GURL /* url */,
1324 GURL /* referrer */)
1325
1326 // Used to go to the session history entry at the given offset (ie, -1 will
1327 // return the "back" item).
1328 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1329 int /* offset (from current) of history item to get */)
1330
1331 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
1332 std::wstring /* in - alert message */,
1333 std::wstring /* in - default prompt */,
1334 GURL /* in - originating page URL */,
1335 int /* in - dialog flags */,
1336 bool /* out - success */,
1337 std::wstring /* out - prompt field */)
1338
1339 // Provides the contents for the given page that was loaded recently.
1340 IPC_MESSAGE_ROUTED5(ViewHostMsg_PageContents,
1341 GURL /* URL of the page */,
1342 int32 /* page id */,
1343 string16 /* page contents */,
1344 std::string /* page ISO639_1 language code */,
1345 bool /* whether the page can be translated */)
1346
1347 // Used to get the extension message bundle.
1348 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle,
1349 std::string /* extension id */,
1350 SubstitutionMap /* message bundle */)
1351
1352 // Specifies the URL as the first parameter (a wstring) and thumbnail as
1353 // binary data as the second parameter.
1354 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
1355 GURL /* url */,
1356 ThumbnailScore /* score */,
1357 SkBitmap /* bitmap */)
1358
1359 // Send a snapshot of the tab contents to the render host.
1360 IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
1361 SkBitmap /* bitmap */)
1362
1363 // Notification that the url for the favicon of a site has been determined.
1364 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFavIconURL,
1365 int32 /* page_id */,
1366 GURL /* url of the favicon */)
1367
1368 // Used to tell the parent that the user right clicked on an area of the
1369 // content area, and a context menu should be shown for it. The params
1370 // object contains information about the node(s) that were selected when the
1371 // user right clicked.
1372 IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, ContextMenuParams)
1373
1374 // Requests that the given URL be opened in the specified manner.
1375 IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenURL,
1376 GURL /* url */,
1377 GURL /* referrer */,
1378 WindowOpenDisposition /* disposition */)
1379
1380 // Notifies that the preferred size of the content changed.
1381 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1382 gfx::Size /* pref_size */)
1383
1384 // Following message is used to communicate the values received by the
1385 // callback binding the JS to Cpp.
1386 // An instance of browser that has an automation host listening to it can
1387 // have a javascript send a native value (string, number, boolean) to the
1388 // listener in Cpp. (DomAutomationController)
1389 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
1390 std::string /* json_string */,
1391 int /* automation_id */)
1392
1393 // A message from HTML-based UI. When (trusted) Javascript calls
1394 // send(message, args), this message is sent to the browser.
1395 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1396 GURL /* source_url */,
1397 std::string /* message */,
1398 std::string /* args (as a JSON string) */)
1399
1400 // A message for an external host.
1401 IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
1402 std::string /* message */,
1403 std::string /* origin */,
1404 std::string /* target */)
1405
1406 // A renderer sends this to the browser process when it wants to
1407 // create a plugin. The browser will create the plugin process if
1408 // necessary, and will return a handle to the channel on success.
1409 // On error an empty string is returned.
1410 IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
1411 int /* routing_id */,
1412 GURL /* url */,
1413 std::string /* mime_type */,
1414 IPC::ChannelHandle /* channel_handle */,
1415 webkit::npapi::WebPluginInfo /* info */)
1416
1417 // A renderer sends this to the browser process when it wants to
1418 // create a pepper plugin. The browser will create the plugin process if
1419 // necessary, and will return a handle to the channel on success.
1420 // On error an empty string is returned.
1421 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin,
1422 FilePath /* path */,
1423 base::ProcessHandle /* plugin_process_handle */,
1424 IPC::ChannelHandle /* handle to channel */)
1425
1426 // A renderer sends this to the browser process when it wants to start
1427 // a new instance of the Native Client process. The browser will launch
1428 // the process and return a handle to an IMC channel.
1429 IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
1430 std::wstring /* url for the NaCl module */,
1431 int /* socket count */,
1432 std::vector<nacl::FileDescriptor>
1433 /* imc channel handles */,
1434 base::ProcessHandle /* NaCl process handle */,
1435 base::ProcessId /* NaCl process id */)
1436
1437 #if defined(USE_X11)
1438 // A renderer sends this when it needs a browser-side widget for
1439 // hosting a windowed plugin. id is the XID of the plugin window, for which
1440 // the container is created.
1441 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
1442 gfx::PluginWindowHandle /* id */)
1443
1444 // Destroy a plugin container previously created using CreatePluginContainer.
1445 // id is the XID of the plugin window corresponding to the container that is
1446 // to be destroyed.
1447 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
1448 gfx::PluginWindowHandle /* id */)
1449 #endif
1450
1451 // Clipboard IPC messages
1452
1453 // This message is used when the object list does not contain a bitmap.
1454 IPC_MESSAGE_CONTROL1(ViewHostMsg_ClipboardWriteObjectsAsync,
1455 ui::Clipboard::ObjectMap /* objects */)
1456 // This message is used when the object list contains a bitmap.
1457 // It is synchronized so that the renderer knows when it is safe to
1458 // free the shared memory used to transfer the bitmap.
1459 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_ClipboardWriteObjectsSync,
1460 ui::Clipboard::ObjectMap /* objects */,
1461 base::SharedMemoryHandle /* bitmap handle */)
1462 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_ClipboardIsFormatAvailable,
1463 std::string /* format */,
1464 ui::Clipboard::Buffer /* buffer */,
1465 bool /* result */)
1466 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ClipboardReadText,
1467 ui::Clipboard::Buffer /* buffer */,
1468 string16 /* result */)
1469 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ClipboardReadAsciiText,
1470 ui::Clipboard::Buffer /* buffer */,
1471 std::string /* result */)
1472 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ClipboardReadHTML,
1473 ui::Clipboard::Buffer /* buffer */,
1474 string16 /* markup */,
1475 GURL /* url */)
1476
1477 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_ClipboardReadAvailableTypes,
1478 ui::Clipboard::Buffer /* buffer */,
1479 bool /* result */,
1480 std::vector<string16> /* types */,
1481 bool /* contains filenames */)
1482 IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_ClipboardReadData,
1483 ui::Clipboard::Buffer /* buffer */,
1484 string16 /* type */,
1485 bool /* succeeded */,
1486 string16 /* data */,
1487 string16 /* metadata */)
1488 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ClipboardReadFilenames,
1489 ui::Clipboard::Buffer /* buffer */,
1490 bool /* result */,
1491 std::vector<string16> /* filenames */)
1492
1493 #if defined(OS_MACOSX)
1494 IPC_MESSAGE_CONTROL1(ViewHostMsg_ClipboardFindPboardWriteStringAsync,
1495 string16 /* text */)
1496
1497 // Request that the browser load a font into shared memory for us.
1498 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
1499 FontDescriptor /* font to load */,
1500 uint32 /* buffer size */,
1501 base::SharedMemoryHandle /* font data */)
1502 #endif
1503
1504 #if defined(OS_WIN)
1505 // Request that the given font be loaded by the browser so it's cached by the
1506 // OS. Please see ChildProcessHost::PreCacheFont for details.
1507 IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
1508 LOGFONT /* font data */)
1509 #endif // defined(OS_WIN)
1510
1511 // Returns WebScreenInfo corresponding to the view.
1512 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1513 // HWND so that we can eliminate the NativeViewId parameter.
1514 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo,
1515 gfx::NativeViewId /* view */,
1516 WebKit::WebScreenInfo /* results */)
1517
1518 // Send the tooltip text for the current mouse position to the browser.
1519 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1520 std::wstring /* tooltip text string */,
1521 WebKit::WebTextDirection /* text direction hint */)
1522
1523 // Notification that the text selection has changed.
1524 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged,
1525 std::string /* currently selected text */)
1526
1527 // Asks the browser to display the file chooser. The result is returned in a
1528 // ViewHost_RunFileChooserResponse message.
1529 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1530 ViewHostMsg_RunFileChooser_Params)
1531
1532 // Used to tell the parent the user started dragging in the content area. The
1533 // WebDropData struct contains contextual information about the pieces of the
1534 // page the user dragged. The parent uses this notification to initiate a
1535 // drag session at the OS level.
1536 IPC_MESSAGE_ROUTED4(ViewHostMsg_StartDragging,
1537 WebDropData /* drop_data */,
1538 WebKit::WebDragOperationsMask /* ops_allowed */,
1539 SkBitmap /* image */,
1540 gfx::Point /* image_offset */)
1541
1542 // The page wants to update the mouse cursor during a drag & drop operation.
1543 // |is_drop_target| is true if the mouse is over a valid drop target.
1544 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateDragCursor,
1545 WebKit::WebDragOperation /* drag_operation */)
1546
1547 // Tells the browser to move the focus to the next (previous if reverse is
1548 // true) focusable element.
1549 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, bool /* reverse */)
1550
1551 // Notification that the page has an OpenSearch description document
1552 // associated with it.
1553 IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
1554 int32 /* page_id */,
1555 GURL /* url of OS description document */,
1556 ViewHostMsg_PageHasOSDD_Type)
1557
1558 // Find out if the given url's security origin is installed as a search
1559 // provider.
1560 IPC_SYNC_MESSAGE_ROUTED2_1(
1561 ViewHostMsg_GetSearchProviderInstallState,
1562 GURL /* page url */,
1563 GURL /* inquiry url */,
1564 ViewHostMsg_GetSearchProviderInstallState_Params /* install */)
1565
1566 // Required for updating text input state.
1567 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeUpdateTextInputState,
1568 WebKit::WebTextInputType, /* text_input_type */
1569 gfx::Rect /* caret_rect */)
1570
1571 // Required for cancelling an ongoing input method composition.
1572 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition)
1573
1574 // Tells the browser that the renderer is done calculating the number of
1575 // rendered pages according to the specified settings.
1576 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidGetPrintedPagesCount,
1577 int /* rendered document cookie */,
1578 int /* number of rendered pages */)
1579
1580 // Sends back to the browser the rendered "printed page" that was requested by
1581 // a ViewMsg_PrintPage message or from scripted printing. The memory handle in
1582 // this message is already valid in the browser process.
1583 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidPrintPage,
1584 ViewHostMsg_DidPrintPage_Params /* page content */)
1585
1586 // The renderer wants to know the default print settings.
1587 IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDefaultPrintSettings,
1588 ViewMsg_Print_Params /* default_settings */)
1589
1590 // The renderer wants to update the current print settings with new
1591 // |job_settings|.
1592 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_UpdatePrintSettings,
1593 int /* document_cookie */,
1594 DictionaryValue /* job_settings */,
1595 ViewMsg_Print_Params /* current_settings */)
1596
1597 // It's the renderer that controls the printing process when it is generated
1598 // by javascript. This step is about showing UI to the user to select the
1599 // final print settings. The output parameter is the same as
1600 // ViewMsg_PrintPages which is executed implicitly.
1601 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_ScriptedPrint,
1602 ViewHostMsg_ScriptedPrint_Params,
1603 ViewMsg_PrintPages_Params
1604 /* settings chosen by the user*/)
1605
1606 // WebKit and JavaScript error messages to log to the console
1607 // or debugger UI.
1608 IPC_MESSAGE_ROUTED3(ViewHostMsg_AddMessageToConsole,
1609 std::wstring, /* msg */
1610 int32, /* line number */
1611 std::wstring /* source id */)
1612
1613 // Stores new inspector setting in the profile.
1614 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
1615 std::string, /* key */
1616 std::string /* value */)
1617
1618 // Wraps an IPC message that's destined to the DevToolsClient on
1619 // DevToolsAgent->browser hop.
1620 IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardToDevToolsClient,
1621 IPC::Message /* one of DevToolsClientMsg_XXX types */)
1622
1623 // Wraps an IPC message that's destined to the DevToolsAgent on
1624 // DevToolsClient->browser hop.
1625 IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardToDevToolsAgent,
1626 IPC::Message /* one of DevToolsAgentMsg_XXX types */)
1627
1628 // Activates (brings to the front) corresponding dev tools window.
1629 IPC_MESSAGE_ROUTED0(ViewHostMsg_ActivateDevToolsWindow)
1630
1631 // Closes dev tools window that is inspecting current render_view_host.
1632 IPC_MESSAGE_ROUTED0(ViewHostMsg_CloseDevToolsWindow)
1633
1634 // Attaches dev tools window that is inspecting current render_view_host.
1635 IPC_MESSAGE_ROUTED0(ViewHostMsg_RequestDockDevToolsWindow)
1636
1637 // Detaches dev tools window that is inspecting current render_view_host.
1638 IPC_MESSAGE_ROUTED0(ViewHostMsg_RequestUndockDevToolsWindow)
1639
1640 // Updates runtime features store in devtools manager in order to support
1641 // cross-navigation instrumentation.
1642 IPC_MESSAGE_ROUTED2(ViewHostMsg_DevToolsRuntimePropertyChanged,
1643 std::string /* name */,
1644 std::string /* value */)
1645
1646 // Send back a string to be recorded by UserMetrics.
1647 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1648 std::string /* action */)
1649
1650 // Send back histograms as vector of pickled-histogram strings.
1651 IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererHistograms,
1652 int, /* sequence number of Renderer Histograms. */
1653 std::vector<std::string>)
1654
1655 #if defined USE_TCMALLOC
1656 // Send back tcmalloc stats output.
1657 IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererTcmalloc,
1658 int /* pid */,
1659 std::string /* tcmalloc debug output */)
1660 #endif
1661
1662 // Sends back stats about the V8 heap.
1663 IPC_MESSAGE_CONTROL2(ViewHostMsg_V8HeapStats,
1664 int /* size of heap (allocated from the OS) */,
1665 int /* bytes in use */)
1666
1667 // Request for a DNS prefetch of the names in the array.
1668 // NameList is typedef'ed std::vector<std::string>
1669 IPC_MESSAGE_CONTROL1(ViewHostMsg_DnsPrefetch,
1670 std::vector<std::string> /* hostnames */)
1671
1672 // Notifies when default plugin updates status of the missing plugin.
1673 IPC_MESSAGE_ROUTED1(ViewHostMsg_MissingPluginStatus,
1674 int /* status */)
1675
1676 // Sent by the renderer process to indicate that a plugin instance has
1677 // crashed.
1678 IPC_MESSAGE_ROUTED1(ViewHostMsg_CrashedPlugin,
1679 FilePath /* plugin_path */)
1680
1681 // Notifies when a plugin couldn't be loaded because it's outdated.
1682 IPC_MESSAGE_ROUTED2(ViewHostMsg_BlockedOutdatedPlugin,
1683 string16, /* name */
1684 GURL /* update_url */)
1685
1686 // Displays a JavaScript out-of-memory message in the infobar.
1687 IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
1688
1689 // Displays a box to confirm that the user wants to navigate away from the
1690 // page. Replies true if yes, false otherwise, the reply string is ignored,
1691 // but is included so that we can use OnJavaScriptMessageBoxClosed.
1692 IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_RunBeforeUnloadConfirm,
1693 GURL, /* in - originating frame URL */
1694 std::wstring /* in - alert message */,
1695 bool /* out - success */,
1696 std::wstring /* out - This is ignored.*/)
1697
1698 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1699 std::vector<GURL> /* all savable resource links */,
1700 std::vector<GURL> /* all referrers of resource links */,
1701 std::vector<GURL> /* all frame links */)
1702
1703 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1704 GURL /* frame's url */,
1705 std::string /* data buffer */,
1706 int32 /* complete status */)
1707
1708 IPC_SYNC_MESSAGE_ROUTED4_1(ViewHostMsg_ShowModalHTMLDialog,
1709 GURL /* url */,
1710 int /* width */,
1711 int /* height */,
1712 std::string /* json_arguments */,
1713 std::string /* json_retval */)
1714
1715 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidGetApplicationInfo,
1716 int32 /* page_id */,
1717 WebApplicationInfo)
1718
1719 // Sent by the renderer to implement chrome.app.installApplication().
1720 IPC_MESSAGE_ROUTED1(ViewHostMsg_InstallApplication,
1721 WebApplicationInfo)
1722
1723 // Provides the result from running OnMsgShouldClose. |proceed| matches the
1724 // return value of the the frame's shouldClose method (which includes the
1725 // onbeforeunload handler): true if the user decided to proceed with leaving
1726 // the page.
1727 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK,
1728 bool /* proceed */)
1729
1730 // Indicates that the current page has been closed, after a ClosePage
1731 // message. The parameters are just echoed from the ClosePage request.
1732 IPC_MESSAGE_ROUTED1(ViewHostMsg_ClosePage_ACK,
1733 ViewMsg_ClosePage_Params)
1734
1735 IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavIcon,
1736 int /* Identifier of the request */,
1737 GURL /* URL of the image */,
1738 bool /* true if there was a network error */,
1739 SkBitmap /* image_data */)
1740
1741 // Get the CPBrowsingContext associated with the renderer sending this
1742 // message.
1743 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPBrowsingContext,
1744 uint32 /* context */)
1745
1746 IPC_MESSAGE_CONTROL1(ViewHostMsg_RevealFolderInOS,
1747 FilePath /* path */)
1748
1749 // Sent when a provisional load on the main frame redirects.
1750 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad,
1751 int /* page_id */,
1752 GURL /* last url */,
1753 GURL /* url redirected to */)
1754
1755 // Sent when the renderer changes the zoom level for a particular url, so the
1756 // browser can update its records. If remember is true, then url is used to
1757 // update the zoom level for all pages in that site. Otherwise, the render
1758 // view's id is used so that only the menu is updated.
1759 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL,
1760 double /* zoom_level */,
1761 bool /* remember */,
1762 GURL /* url */)
1763
1764 #if defined(OS_WIN)
1765 // Duplicates a shared memory handle from the renderer to the browser. Then
1766 // the renderer can flush the handle.
1767 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_DuplicateSection,
1768 base::SharedMemoryHandle /* renderer handle */,
1769 base::SharedMemoryHandle /* browser handle */)
1770 #endif
1771
1772 #if defined(USE_X11)
1773 // Asks the browser to create a temporary file for the renderer to fill
1774 // in resulting NativeMetafile in printing.
1775 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_AllocateTempFileForPrinting,
1776 base::FileDescriptor /* temp file fd */,
1777 int /* fd in browser*/)
1778 IPC_MESSAGE_CONTROL1(ViewHostMsg_TempFileForPrintingWritten,
1779 int /* fd in browser */)
1780 #endif
1781
1782 // Asks the browser to create a block of shared memory for the renderer to
1783 // fill in and pass back to the browser.
1784 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_AllocateSharedMemoryBuffer,
1785 uint32 /* buffer size */,
1786 base::SharedMemoryHandle /* browser handle */)
1787
1788 // Provide the browser process with information about the WebCore resource
1789 // cache.
1790 IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
1791 WebKit::WebCache::ResourceTypeStats)
1792
1793 // Notify the browser that this render process can or can't be suddenly
1794 // terminated.
1795 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1796 bool /* enabled */)
1797
1798 // Returns the window location of the window this widget is embeded.
1799 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1800 // HWND so that we can eliminate the NativeViewId parameter.
1801 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
1802 gfx::NativeViewId /* window */,
1803 gfx::Rect /* Out: Window location */)
1804
1805 // Informs the browser of a new appcache host.
1806 IPC_MESSAGE_CONTROL1(AppCacheMsg_RegisterHost,
1807 int /* host_id */)
1808
1809 // Informs the browser of an appcache host being destroyed.
1810 IPC_MESSAGE_CONTROL1(AppCacheMsg_UnregisterHost,
1811 int /* host_id */)
1812
1813 // Initiates the cache selection algorithm for the given host.
1814 // This is sent prior to any subresource loads. An AppCacheMsg_CacheSelected
1815 // message will be sent in response.
1816 // 'host_id' indentifies a specific document or worker
1817 // 'document_url' the url of the main resource
1818 // 'appcache_document_was_loaded_from' the id of the appcache the main
1819 // resource was loaded from or kNoCacheId
1820 // 'opt_manifest_url' the manifest url specified in the <html> tag if any
1821 IPC_MESSAGE_CONTROL4(AppCacheMsg_SelectCache,
1822 int /* host_id */,
1823 GURL /* document_url */,
1824 int64 /* appcache_document_was_loaded_from */,
1825 GURL /* opt_manifest_url */)
1826
1827 // Initiates worker specific cache selection algorithm for the given host.
1828 IPC_MESSAGE_CONTROL3(AppCacheMsg_SelectCacheForWorker,
1829 int /* host_id */,
1830 int /* parent_process_id */,
1831 int /* parent_host_id */)
1832 IPC_MESSAGE_CONTROL2(AppCacheMsg_SelectCacheForSharedWorker,
1833 int /* host_id */,
1834 int64 /* appcache_id */)
1835
1836 // Informs the browser of a 'foreign' entry in an appcache.
1837 IPC_MESSAGE_CONTROL3(AppCacheMsg_MarkAsForeignEntry,
1838 int /* host_id */,
1839 GURL /* document_url */,
1840 int64 /* appcache_document_was_loaded_from */)
1841
1842 // Returns the status of the appcache associated with host_id.
1843 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheMsg_GetStatus,
1844 int /* host_id */,
1845 appcache::Status)
1846
1847 // Initiates an update of the appcache associated with host_id.
1848 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheMsg_StartUpdate,
1849 int /* host_id */,
1850 bool /* success */)
1851
1852 // Swaps a new pending appcache, if there is one, into use for host_id.
1853 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheMsg_SwapCache,
1854 int /* host_id */,
1855 bool /* success */)
1856
1857 // Gets resource list from appcache synchronously.
1858 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheMsg_GetResourceList,
1859 int /* host_id in*/,
1860 std::vector<appcache::AppCacheResourceInfo>
1861 /* resources out */)
1862
1863 // Get the list of proxies to use for |url|, as a semicolon delimited list
1864 // of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also
1865 // PluginProcessHostMsg_ResolveProxy which does the same thing.
1866 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1867 GURL /* url */,
1868 int /* network error */,
1869 std::string /* proxy list */)
1870
1871 // Request that got sent to browser for creating an audio output stream
1872 IPC_MESSAGE_ROUTED3(ViewHostMsg_CreateAudioStream,
1873 int /* stream_id */,
1874 ViewHostMsg_Audio_CreateStream_Params,
1875 bool /* low-latency */)
1876
1877 // Tell the browser the audio buffer prepared for stream
1878 // (render_view_id, stream_id) is filled and is ready to be consumed.
1879 IPC_MESSAGE_ROUTED2(ViewHostMsg_NotifyAudioPacketReady,
1880 int /* stream_id */,
1881 uint32 /* packet size */)
1882
1883 // Start buffering and play the audio stream specified by
1884 // (render_view_id, stream_id).
1885 IPC_MESSAGE_ROUTED1(ViewHostMsg_PlayAudioStream,
1886 int /* stream_id */)
1887
1888 // Pause the audio stream specified by (render_view_id, stream_id).
1889 IPC_MESSAGE_ROUTED1(ViewHostMsg_PauseAudioStream,
1890 int /* stream_id */)
1891
1892 // Discard all buffered audio data for the specified audio stream.
1893 IPC_MESSAGE_ROUTED1(ViewHostMsg_FlushAudioStream,
1894 int /* stream_id */)
1895
1896 // Close an audio stream specified by (render_view_id, stream_id).
1897 IPC_MESSAGE_ROUTED1(ViewHostMsg_CloseAudioStream,
1898 int /* stream_id */)
1899
1900 // Get audio volume of the stream specified by (render_view_id, stream_id).
1901 IPC_MESSAGE_ROUTED1(ViewHostMsg_GetAudioVolume,
1902 int /* stream_id */)
1903
1904 // Set audio volume of the stream specified by (render_view_id, stream_id).
1905 // TODO(hclam): change this to vector if we have channel numbers other than 2.
1906 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetAudioVolume,
1907 int /* stream_id */,
1908 double /* volume */)
1909
1910 // A renderer sends this message when an extension process starts an API
1911 // request. The browser will always respond with a ViewMsg_ExtensionResponse.
1912 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest,
1913 ViewHostMsg_DomMessage_Params)
1914
1915 // Notify the browser that the given extension added a listener to an event.
1916 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener,
1917 std::string /* extension_id */,
1918 std::string /* name */)
1919
1920 // Notify the browser that the given extension removed a listener from an
1921 // event.
1922 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionRemoveListener,
1923 std::string /* extension_id */,
1924 std::string /* name */)
1925
1926 // Message sent from renderer to the browser to update the state of a command.
1927 // The |command| parameter is a RenderViewCommand. The |checked_state| parameter
1928 // is a CommandCheckedState.
1929 IPC_MESSAGE_ROUTED3(ViewHostMsg_CommandStateChanged,
1930 int /* command */,
1931 bool /* is_enabled */,
1932 int /* checked_state */)
1933
1934 #if defined(OS_MACOSX)
1935 // On OSX, we cannot allocated shared memory from within the sandbox, so
1936 // this call exists for the renderer to ask the browser to allocate memory
1937 // on its behalf. We return a file descriptor to the POSIX shared memory.
1938 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1939 // by the browser, and it is the caller's repsonsibility to send a
1940 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1941 // In all cases, the caller is responsible for deleting the resulting
1942 // TransportDIB.
1943 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1944 size_t, /* bytes requested */
1945 bool, /* cache in the browser */
1946 TransportDIB::Handle /* DIB */)
1947
1948 // Since the browser keeps handles to the allocated transport DIBs, this
1949 // message is sent to tell the browser that it may release them when the
1950 // renderer is finished with them.
1951 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1952 TransportDIB::Id /* DIB id */)
1953
1954 // Informs the browser that a plugin has gained or lost focus.
1955 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1956 bool, /* focused */
1957 int /* plugin_id */)
1958
1959 // Instructs the browser to start plugin IME.
1960 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1961
1962 //---------------------------------------------------------------------------
1963 // Messages related to accelerated plugins
1964
1965 // This is sent from the renderer to the browser to allocate a fake
1966 // PluginWindowHandle on the browser side which is used to identify
1967 // the plugin to the browser later when backing store is allocated
1968 // or reallocated. |opaque| indicates whether the plugin's output is
1969 // considered to be opaque, as opposed to translucent. This message
1970 // is reused for rendering the accelerated compositor's output.
1971 // |root| indicates whether the output is supposed to cover the
1972 // entire window.
1973 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_AllocateFakePluginWindowHandle,
1974 bool /* opaque */,
1975 bool /* root */,
1976 gfx::PluginWindowHandle /* id */)
1977
1978 // Destroys a fake window handle previously allocated using
1979 // AllocateFakePluginWindowHandle.
1980 IPC_MESSAGE_ROUTED1(ViewHostMsg_DestroyFakePluginWindowHandle,
1981 gfx::PluginWindowHandle /* id */)
1982
1983 // This message, used on Mac OS X 10.5 and earlier (no IOSurface support),
1984 // is sent from the renderer to the browser on behalf of the plug-in
1985 // to indicate that a new backing store was allocated for that plug-in
1986 // instance.
1987 IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetTransportDIB,
1988 gfx::PluginWindowHandle /* window */,
1989 int32 /* width */,
1990 int32 /* height */,
1991 TransportDIB::Handle /* handle for the DIB */)
1992
1993 // This message, used on Mac OS X 10.6 and later (where IOSurface is
1994 // supported), is sent from the renderer to the browser on behalf of the
1995 // plug-in to indicate that a new backing store was allocated for that
1996 // plug-in instance.
1997 //
1998 // NOTE: the original intent was to pass a mach port as the IOSurface
1999 // identifier but it looks like that will be a lot of work. For now we pass an
2000 // ID from IOSurfaceGetID.
2001 IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetIOSurface,
2002 gfx::PluginWindowHandle /* window */,
2003 int32 /* width */,
2004 int32 /* height */,
2005 uint64 /* surface_id */)
2006
2007 // This message notifies the browser process that the plug-in
2008 // swapped the buffers associated with the given "window", which
2009 // should cause the browser to redraw the various plug-ins'
2010 // contents.
2011 IPC_MESSAGE_ROUTED2(ViewHostMsg_AcceleratedSurfaceBuffersSwapped,
2012 gfx::PluginWindowHandle /* window */,
2013 uint64 /* surface_id */)
2014 #endif
2015
2016 // A renderer sends this to the browser process when it wants to create a
2017 // worker. The browser will create the worker process if necessary, and
2018 // will return the route id on success. On error returns MSG_ROUTING_NONE.
2019 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
2020 ViewHostMsg_CreateWorker_Params,
2021 int /* route_id */)
2022
2023 // This message is sent to the browser to see if an instance of this shared
2024 // worker already exists. If so, it returns exists == true. If a
2025 // non-empty name is passed, also validates that the url matches the url of
2026 // the existing worker. If a matching worker is found, the passed-in
2027 // document_id is associated with that worker, to ensure that the worker
2028 // stays alive until the document is detached.
2029 // The route_id returned can be used to forward messages to the worker via
2030 // ForwardToWorker if it exists, otherwise it should be passed in to any
2031 // future call to CreateWorker to avoid creating duplicate workers.
2032 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker,
2033 ViewHostMsg_CreateWorker_Params,
2034 bool /* exists */,
2035 int /* route_id */,
2036 bool /* url_mismatch */)
2037
2038 // A renderer sends this to the browser process when a document has been
2039 // detached. The browser will use this to constrain the lifecycle of worker
2040 // processes (SharedWorkers are shut down when their last associated document
2041 // is detached).
2042 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
2043 uint64 /* document_id */)
2044
2045 // A message sent to the browser on behalf of a renderer which wants to show
2046 // a desktop notification.
2047 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowDesktopNotification,
2048 ViewHostMsg_ShowNotification_Params)
2049 IPC_MESSAGE_ROUTED1(ViewHostMsg_CancelDesktopNotification,
2050 int /* notification_id */)
2051 IPC_MESSAGE_ROUTED2(ViewHostMsg_RequestNotificationPermission,
2052 GURL /* origin */,
2053 int /* callback_context */)
2054 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CheckNotificationPermission,
2055 GURL /* source page */,
2056 int /* permission_result */)
2057
2058 // Sent if the worker object has sent a ViewHostMsg_CreateDedicatedWorker
2059 // message and not received a ViewMsg_WorkerCreated reply, but in the
2060 // mean time it's destroyed. This tells the browser to not create the queued
2061 // worker.
2062 IPC_MESSAGE_CONTROL1(ViewHostMsg_CancelCreateDedicatedWorker,
2063 int /* route_id */)
2064
2065 // Wraps an IPC message that's destined to the worker on the renderer->browser
2066 // hop.
2067 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
2068 IPC::Message /* message */)
2069
2070 // Open a channel to all listening contexts owned by the extension with
2071 // the given ID. This always returns a valid port ID which can be used for
2072 // sending messages. If an error occurred, the opener will be notified
2073 // asynchronously.
2074 IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_OpenChannelToExtension,
2075 int /* routing_id */,
2076 std::string /* source_extension_id */,
2077 std::string /* target_extension_id */,
2078 std::string /* channel_name */,
2079 int /* port_id */)
2080
2081 // Get a port handle to the given tab. The handle can be used for sending
2082 // messages to the extension.
2083 IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_OpenChannelToTab,
2084 int /* routing_id */,
2085 int /* tab_id */,
2086 std::string /* extension_id */,
2087 std::string /* channel_name */,
2088 int /* port_id */)
2089
2090 // Send a message to an extension process. The handle is the value returned
2091 // by ViewHostMsg_OpenChannelTo*.
2092 IPC_MESSAGE_ROUTED2(ViewHostMsg_ExtensionPostMessage,
2093 int /* port_id */,
2094 std::string /* message */)
2095
2096 // Send a message to an extension process. The handle is the value returned
2097 // by ViewHostMsg_OpenChannelTo*.
2098 IPC_MESSAGE_CONTROL1(ViewHostMsg_ExtensionCloseChannel,
2099 int /* port_id */)
2100
2101 // Sent to notify the browser about renderer accessibility notifications.
2102 // The browser responds with a ViewMsg_AccessibilityNotifications_ACK.
2103 IPC_MESSAGE_ROUTED1(
2104 ViewHostMsg_AccessibilityNotifications,
2105 std::vector<ViewHostMsg_AccessibilityNotification_Params>)
2106
2107 // Send part of the DOM to the browser, to be used in a malware report.
2108 IPC_MESSAGE_ROUTED1(ViewHostMsg_MalwareDOMDetails,
2109 ViewHostMsg_MalwareDOMDetails_Params)
2110
2111 // Message sent from the renderer to the browser to request that the browser
2112 // close all sockets. Used for debugging/testing.
2113 IPC_MESSAGE_CONTROL0(ViewHostMsg_CloseCurrentConnections)
2114
2115 // Message sent from the renderer to the browser to request that the browser
2116 // enable or disable the cache. Used for debugging/testing.
2117 IPC_MESSAGE_CONTROL1(ViewHostMsg_SetCacheMode,
2118 bool /* enabled */)
2119
2120 // Message sent from the renderer to the browser to request that the browser
2121 // clear the cache. Used for debugging/testing.
2122 // |preserve_ssl_host_info| controls whether clearing the cache will preserve
2123 // persisted SSL information stored in the cache.
2124 // |result| is the returned status from the operation.
2125 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ClearCache,
2126 bool /* preserve_ssl_host_info */,
2127 int /* result */)
2128
2129 // Message sent from the renderer to the browser to request that the browser
2130 // enable or disable spdy. Used for debugging/testing/benchmarking.
2131 IPC_MESSAGE_CONTROL1(ViewHostMsg_EnableSpdy,
2132 bool /* enable */)
2133
2134 // Message sent from the renderer to the browser to request that the browser
2135 // cache |data| associated with |url|.
2136 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
2137 GURL /* url */,
2138 double /* expected_response_time */,
2139 std::vector<char> /* data */)
2140
2141 // Opens a file asynchronously. The response returns a file descriptor
2142 // and an error code from base/platform_file.h.
2143 IPC_MESSAGE_ROUTED3(ViewHostMsg_AsyncOpenFile,
2144 FilePath /* file path */,
2145 int /* flags */,
2146 int /* message_id */)
2147
2148 // Sent by the renderer process to acknowledge receipt of a
2149 // ViewMsg_CSSInsertRequest message and css has been inserted into the frame.
2150 IPC_MESSAGE_ROUTED0(ViewHostMsg_OnCSSInserted)
2151
2152 // Notifies the browser of the language (ISO 639_1 code language, such as fr,
2153 // en, zh...) of the current page.
2154 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined,
2155 std::string /* the language */)
2156
2157 // Notifies the browser that a page has been translated.
2158 IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
2159 int, /* page id */
2160 std::string /* the original language */,
2161 std::string /* the translated language */,
2162 TranslateErrors::Type /* the error type if available */)
2163
2164 //---------------------------------------------------------------------------
2165 // Request for cryptographic operation messages:
2166 // These are messages from the renderer to the browser to perform a
2167 // cryptographic operation.
2168
2169 // Asks the browser process to generate a keypair for grabbing a client
2170 // certificate from a CA (<keygen> tag), and returns the signed public
2171 // key and challenge string.
2172 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
2173 uint32 /* key size index */,
2174 std::string /* challenge string */,
2175 GURL /* URL of requestor */,
2176 std::string /* signed public key and challenge */)
2177
2178 // The renderer has tried to spell check a word, but couldn't because no
2179 // dictionary was available to load. Request that the browser find an
2180 // appropriate dictionary and return it.
2181 IPC_MESSAGE_CONTROL0(ViewHostMsg_SpellChecker_RequestDictionary)
2182
2183 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_SpellChecker_PlatformCheckSpelling,
2184 string16 /* word */,
2185 int /* document tag */,
2186 bool /* correct */)
2187
2188 IPC_SYNC_MESSAGE_CONTROL1_1(
2189 ViewHostMsg_SpellChecker_PlatformFillSuggestionList,
2190 string16 /* word */,
2191 std::vector<string16> /* suggestions */)
2192
2193 IPC_MESSAGE_CONTROL4(ViewHostMsg_SpellChecker_PlatformRequestTextCheck,
2194 int /* route_id for response */,
2195 int /* request identifier given by WebKit */,
2196 int /* document tag */,
2197 string16 /* sentence */)
2198
2199 //---------------------------------------------------------------------------
2200 // Geolocation services messages
2201
2202 // The |render_view_id| and |bridge_id| representing |host| is requesting
2203 // permission to access geolocation position.
2204 // This will be replied by ViewMsg_Geolocation_PermissionSet.
2205 IPC_MESSAGE_CONTROL3(ViewHostMsg_Geolocation_RequestPermission,
2206 int /* render_view_id */,
2207 int /* bridge_id */,
2208 GURL /* GURL of the frame requesting geolocation */)
2209
2210 // The |render_view_id| and |bridge_id| representing |GURL| is cancelling its
2211 // previous permission request to access geolocation position.
2212 IPC_MESSAGE_CONTROL3(ViewHostMsg_Geolocation_CancelPermissionRequest,
2213 int /* render_view_id */,
2214 int /* bridge_id */,
2215 GURL /* GURL of the frame */)
2216
2217 // The |render_view_id| requests Geolocation service to start updating.
2218 // This is an asynchronous call, and the browser process may eventually reply
2219 // with the updated geoposition, or an error (access denied, location
2220 // unavailable, etc.)
2221 IPC_MESSAGE_CONTROL3(ViewHostMsg_Geolocation_StartUpdating,
2222 int /* render_view_id */,
2223 GURL /* GURL of the frame requesting geolocation */,
2224 bool /* enable_high_accuracy */)
2225
2226 // The |render_view_id| requests Geolocation service to stop updating.
2227 // Note that the geolocation service may continue to fetch geolocation data
2228 // for other origins.
2229 IPC_MESSAGE_CONTROL1(ViewHostMsg_Geolocation_StopUpdating,
2230 int /* render_view_id */)
2231
2232 // Updates the minimum/maximum allowed zoom percent for this tab from the
2233 // default values. If |remember| is true, then the zoom setting is applied to
2234 // other pages in the site and is saved, otherwise it only applies to this
2235 // tab.
2236 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits,
2237 int /* minimum_percent */,
2238 int /* maximum_percent */,
2239 bool /* remember */)
2240
2241 //---------------------------------------------------------------------------
2242 // Device orientation services messages:
2243
2244 // A RenderView requests to start receiving device orientation updates.
2245 IPC_MESSAGE_CONTROL1(ViewHostMsg_DeviceOrientation_StartUpdating,
2246 int /* render_view_id */)
2247
2248 // A RenderView requests to stop receiving device orientation updates.
2249 IPC_MESSAGE_CONTROL1(ViewHostMsg_DeviceOrientation_StopUpdating,
2250 int /* render_view_id */)
2251
2252 //---------------------------------------------------------------------------
2253 // Blob messages:
2254
2255 // Registers a blob URL referring to the specified blob data.
2256 IPC_MESSAGE_CONTROL2(ViewHostMsg_RegisterBlobUrl,
2257 GURL /* url */,
2258 scoped_refptr<webkit_blob::BlobData> /* blob_data */)
2259
2260 // Registers a blob URL referring to the blob data identified by the specified
2261 // source URL.
2262 IPC_MESSAGE_CONTROL2(ViewHostMsg_RegisterBlobUrlFrom,
2263 GURL /* url */,
2264 GURL /* src_url */)
2265
2266 // Unregister a blob URL.
2267 IPC_MESSAGE_CONTROL1(ViewHostMsg_UnregisterBlobUrl, GURL /* url */)
2268
2269 // Suggest results -----------------------------------------------------------
2270
2271 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSuggestions,
2272 int32 /* page_id */,
2273 std::vector<std::string> /* suggestions */)
2274
2275 IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
2276 int32 /* page_id */,
2277 bool /* result */)
2278
2279 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
2280 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the
2281 // script as it's only element, one of Null, Boolean, Integer, Real, Date, or
2282 // String.
2283 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse,
2284 int /* id */,
2285 ListValue /* result */)
2286
2287 // Updates the content restrictions, i.e. to disable print/copy.
2288 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions,
2289 int /* restrictions */)
2290
2291 // The currently displayed PDF has an unsupported feature.
2292 IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature)
2293
2294 // JavaScript related messages -----------------------------------------------
2295
2296 // Notify the JavaScript engine in the render to change its parameters
2297 // while performing stress testing.
2298 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
2299 int /* cmd */,
2300 int /* param */)
2301
2302 // Register a new handler for URL requests with the given scheme.
2303 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
2304 std::string /* scheme */,
2305 GURL /* url */,
2306 string16 /* title */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698