Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This header is meant to be included in multiple passes, hence no traditional
// header guard.
// See ipc_message_macros.h for explanation of the macros and passes.

#include <map>
#include <string>
#include <vector>

#include "build/build_config.h"

#include "base/file_path.h"
#include "base/nullable_string16.h"
#include "base/platform_file.h"
#include "base/sync_socket.h"
#include "base/time.h"
#include "base/values.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/extensions/update_manifest.h"
#include "chrome/common/geoposition.h"
#include "chrome/common/nacl_types.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/page_zoom.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/window_container_type.h"
#include "gfx/rect.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/webcursor.h"

#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"

#if defined(OS_MACOSX)
#include "chrome/common/font_descriptor_mac.h"

// TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
// more sense with our current design.

// IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
// to typedef it to avoid that.
// Substitution map for l10n messages.
typedef std::map<std::string, std::string> SubstitutionMap;

// RenderView messages
// These are messages sent from the browser to the renderer process.

  // Used typically when recovering from a crash.  The new rendering process
  // sets its global "next page id" counter to the given value.
                       int32 /* next_page_id */)

  // Sends System Colors corresponding to a set of CSS color keywords
  // down the pipe.
  // This message must be sent to the renderer immediately on launch
  // before creating any new views.
  // The message can also be sent during a renderer's lifetime if system colors
  // are updated.
  // TODO(jeremy): Possibly change IPC format once we have this all hooked up.

  // Tells the renderer to create a new view.
  // This message is slightly different, the view it takes (via
  // ViewMsg_New_Params) is the view to create, the message itself is sent as a
  // non-view control message.

  // Tells the renderer to set its maximum cache size to the supplied value
                       size_t /* min_dead_capacity */,
                       size_t /* max_dead_capacity */,
                       size_t /* capacity */)

  // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
  // similar to the new command, but used when the renderer created a view
  // first, and we need to update it
                      gfx::NativeViewId /* parent_hwnd */)

  // Sends updated preferences to the renderer.

  // Tells the renderer to perform the given action on the media player
  // located at the given point.
                      gfx::Point, /* location */

  // Tells the render view to close.

  // Tells the render view to change its size.  A ViewHostMsg_PaintRect message
  // is generated in response provided new_size is not empty and not equal to
  // the view's current size.  The generated ViewHostMsg_PaintRect message will
  // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
  // we don't have to fetch it every time WebKit asks for it.
                      gfx::Size /* new_size */,
                      gfx::Rect /* resizer_rect */)

  // Sent to inform the view that it was hidden.  This allows it to reduce its
  // resource utilization.

  // Tells the render view that it is no longer hidden (see WasHidden), and the
  // render view is expected to respond with a full repaint if needs_repainting
  // is true.  In that case, the generated ViewHostMsg_PaintRect message will
  // have the IS_RESTORE_ACK flag set.  If needs_repainting is false, then this
  // message does not trigger a message in response.
                      bool /* needs_repainting */)

  // Tells the render view to capture a thumbnail image of the page. The
  // render view responds with a ViewHostMsg_Thumbnail.

  // Tells the render view to capture a thumbnail image of the page. The
  // render view responds with a ViewHostMsg_Snapshot.

  // Tells the render view to switch the CSS to print media type, renders every
  // requested pages and switch back the CSS to display media type.

  // Tells the render view that printing is done so it can clean up.
                      int /* document_cookie */,
                      bool /* success */)

  // Tells the renderer to dump as much memory as it can, perhaps because we
  // have memory pressure or the renderer is (or will be) paged out.  This
  // should only result in purging objects we can recalculate, e.g. caches or
  // JS garbage, not in purging irreplaceable objects.

  // Sent to render the view into the supplied transport DIB, resize
  // the web widget to match the |page_size|, scale it by the
  // appropriate scale to make it fit the |desired_size|, and return
  // it.  In response to this message, the host generates a
  // ViewHostMsg_PaintAtSize_ACK message.  Note that the DIB *must* be
  // the right size to receive an RGBA image at the |desired_size|.
  // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
  // identify the PaintAtSize message the ACK belongs to.
                      TransportDIB::Handle /* dib_handle */,
                      int /* tag */,
                      gfx::Size /* page_size */,
                      gfx::Size /* desired_size */)

  // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
  // This signals the render view that it can send another UpdateRect message.

  // Replies to creating and updating videos.
                      int32 /* video_id */)
                      int32 /* video_id */)

  // Message payload includes:
  // 1. A blob that should be cast to WebInputEvent
  // 2. An optional boolean value indicating if a RawKeyDown event is associated
  //    to a keyboard shortcut of the browser.

  // This message notifies the renderer that the next key event is bound to one
  // or more pre-defined edit commands. If the next key event is not handled
  // by webkit, the specified edit commands shall be executed against current
  // focused frame.
  // Parameters
  // * edit_commands (see chrome/common/edit_command_types.h)
  //   Contains one or more edit commands.
  // See third_party/WebKit/WebCore/editing/EditorCommand.cpp for detailed
  // definition of webkit edit commands.
  // This message must be sent just before sending a key event.
                      EditCommands /* edit_commands */)

  // Message payload is the name/value of a WebCore edit command to execute.
                      std::string, /* name */
                      std::string /* value */)


  // TODO(darin): figure out how this meshes with RestoreFocus
  IPC_MESSAGE_ROUTED1(ViewMsg_SetFocus, bool /* enable */)

  // Tells the renderer to focus the first (last if reverse is true) focusable
  // node.
  IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, bool /* reverse */)

  // Tells the renderer to perform the specified navigation, interrupting any
  // existing navigation.
  IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params)


  // Tells the renderer to reload the current focused frame

  // This message notifies the renderer that the user has closed the FindInPage
  // window (and what action to take regarding the selection).
                      ViewMsg_StopFinding_Params /* action */)

  // These messages are typically generated from context menus and request the
  // renderer to apply the specified operation to the current selection.
#if defined(OS_MACOSX)
  // Replaces the selected region or a word around the cursor with the
  // specified string.
  IPC_MESSAGE_ROUTED1(ViewMsg_Replace, string16)
  IPC_MESSAGE_ROUTED1(ViewMsg_ToggleSpellPanel, bool)

  // This message tells the renderer to advance to the next misspelling. It is
  // sent when the user clicks the "Find Next" button on the spelling panel.

  // Copies the image at location x, y to the clipboard (if there indeed is an
  // image at that location).
                      int /* x */,
                      int /* y */)

  // History system notification that the visited link database has been
  // replaced. It has one SharedMemoryHandle argument consisting of the table
  // handle. This handle is valid in the context of the renderer
  IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_NewTable, base::SharedMemoryHandle)

  // History system notification that a link has been added and the link
  // coloring state for the given hash must be re-calculated.
  IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_Add, std::vector<uint64>)

  // History system notification that one or more history items have been
  // deleted, which at this point means that all link coloring state must be
  // re-calculated.

  // Notification that the user scripts have been updated. It has one
  // SharedMemoryHandle argument consisting of the pickled script data. This
  // handle is valid in the context of the renderer.

  // Sent when the user wants to search for a word on the page (find in page).
                      int /* request_id */,
                      string16 /* search_text */,

  // Send from the renderer to the browser to return the script running result.
                      int, /* request id */
                      bool /* whether the script ran successfully */)

  // Sent when the headers are available for a resource request.
                      int /* request_id */,

  // Sent when cached metadata from a resource request is ready.
                      int /* request_id */,
                      std::vector<char> /* data */)

  // Sent as download progress is being made, size of the resource may be
  // unknown, in that case |size| is -1.
                      int /* request_id */,
                      int64 /* position */,
                      int64 /* size */)

  // Sent as upload progress is being made.
                      int /* request_id */,
                      int64 /* position */,
                      int64 /* size */)

  // Sent when the request has been redirected.  The receiver is expected to
  // respond with either a FollowRedirect message (if the redirect is to be
  // followed) or a CancelRequest message (if it should not be followed).
                      int /* request_id */,
                      GURL /* new_url */,

  // Sent when some data from a resource request is ready. The handle should
  // already be mapped into the process that receives this message.
                      int /* request_id */,
                      base::SharedMemoryHandle /* data */,
                      int /* data_len */)

  // Sent when the request has been completed.
                      int /* request_id */,
                      URLRequestStatus /* status */,
                      std::string /* security info */)

  // Sent when user prompting is required before a ViewHostMsg_GetCookies
  // message can complete.  This message indicates that the renderer should
  // pump messages while waiting for cookies.

  // Request for the renderer to evaluate an xpath to a frame and execute a
  // javascript: url in that frame's context. The message is completely
  // asynchronous and no corresponding response message is sent back.
  // frame_xpath contains the modified xpath notation to identify an inner
  // subframe (starting from the root frame). It is a concatenation of
  // number of smaller xpaths delimited by '\n'. Each chunk in the string can
  // be evaluated to a frame in its parent-frame's context.
  // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
  // can be broken into 3 xpaths
  // /html/body/iframe evaluates to an iframe within the root frame
  // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
  // /frameset/frame[0] evaluates to first frame within the level-2 iframe
  // jscript_url is the string containing the javascript: url to be executed
  // in the target frame's context. The string should start with "javascript:"
  // and continue with a valid JS text.
                      std::wstring,  /* frame_xpath */
                      std::wstring  /* jscript_url */)

  // Request for the renderer to evaluate an xpath to a frame and insert css
  // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
  // allowed xpath expressions.
                      std::wstring,  /* frame_xpath */
                      std::string,  /* css string */
                      std::string  /* element id */)

  // Log a message to the console of the target frame
                      string16 /* frame_xpath */,
                      string16 /* message */,
                      WebKit::WebConsoleMessage::Level /* message_level */)

  // RenderViewHostDelegate::RenderViewCreated method sends this message to a
  // new renderer to notify it that it will host developer tools UI and should
  // set up all neccessary bindings and create DevToolsClient instance that
  // will handle communication with inspected page DevToolsAgent.

  // Change the zoom level for the current main frame.  If the level actually
  // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
  // telling it what url got zoomed and what its current zoom level is.
                      PageZoom::Function /* function */)

  // Set the zoom level for a particular url that the renderer is in the
  // process of loading.  This will be stored, to be used if the load commits
  // and ignored otherwise.
                      GURL /* url */,
                      int /* zoom_level */)

  // Set the zoom level for a particular url, so all render views
  // displaying this url can update their zoom levels to match.
                       GURL /* url */,
                       int /* zoom_level */)

  // Set the content settings for a particular url that the renderer is in the
  // process of loading.  This will be stored, to be used if the load commits
  // and ignored otherwise.
                      GURL /* url */,
                      ContentSettings /* content_settings */)

  // Set the content settings for a particular url, so all render views
  // displaying this host url update their content settings to match.
                       GURL /* url */,
                       ContentSettings /* content_settings */)

  // Change encoding of page in the renderer.
                      std::string /*new encoding name*/)

  // Reset encoding of page in the renderer back to default.

  // Requests the renderer to reserve a range of page ids.
                      int  /* size_of_range */)

  // Fill a form with data and optionally submit it
                      webkit_glue::FormData /* form */)

  // Fill a password form and prepare field autocomplete for multiple
  // matching logins.

  // D&d drop target messages.
                      WebDropData /* drop_data */,
                      gfx::Point /* client_pt */,
                      gfx::Point /* screen_pt */,
                      WebKit::WebDragOperationsMask /* ops_allowed */)
                      gfx::Point /* client_pt */,
                      gfx::Point /* screen_pt */,
                      WebKit::WebDragOperationsMask /* ops_allowed */)
                      gfx::Point /* client_pt */,
                      gfx::Point /* screen_pt */)

  // Notifies the renderer of updates in mouse position of an in-progress
  // drag.  if |ended| is true, then the user has ended the drag operation.
                      gfx::Point /* client_pt */,
                      gfx::Point /* screen_pt */,
                      bool /* ended */,
                      WebKit::WebDragOperation /* drag_operation */)

  // Notifies the renderer that the system DoDragDrop call has ended.

  // Used to tell a render view whether it should expose various bindings
  // that allow JS content extended privileges.  See BindingsPolicy for valid
  // flag values.
                      int /* enabled_bindings_flags */)

  // Tell the renderer to add a property to the DOMUI binding object.  This
  // only works if we allowed DOMUI bindings.
                      std::string /* property_name */,
                      std::string /* property_value_json */)

  // This message starts/stop monitoring the input method status of the focused
  // edit control of a renderer process.
  // Parameters
  // * is_active (bool)
  //   Indicates if an input method is active in the browser process.
  //   The possible actions when a renderer process receives this message are
  //   listed below:
  //     Value Action
  //     true  Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
  //           to notify the input method status of the focused edit control.
  //     false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
                      bool /* is_active */)

  // This message sends a string being composed with an input method.
      string16, /* text */
      std::vector<WebKit::WebCompositionUnderline>, /* underlines */
      int, /* selectiont_start */
      int /* selection_end */)

  // This message confirms an ongoing composition.

  // This passes a set of webkit preferences down to the renderer.
  IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, WebPreferences)

  // Used to notify the render-view that the browser has received a reply for
  // the Find operation and is interested in receiving the next one. This is
  // used to prevent the renderer from spamming the browser process with
  // results.

  // Used to notify the render-view that we have received a target URL. Used
  // to prevent target URLs spamming the browser.

  // Sets the alternate error page URL (link doctor) for the renderer process.

  // Install the first missing pluign.

  // Tells the renderer to empty its plugin list cache, optional reloading
  // pages containing plugins.
                       bool /* reload_pages */)

                      std::vector<FilePath> /* selected files */)

  // Used to instruct the RenderView to go into "view source" mode.

  // Get all savable resource links from current webpage, include main
  // frame and sub-frame.
                      GURL /* url of page which is needed to save */)

  // Get html data by serializing all frames of current page with lists
  // which contain all resource links that have local copy.
                      std::vector<GURL> /* urls that have local copy */,
                      std::vector<FilePath> /* paths of local copy */,
                      FilePath /* local directory path */)

  // Requests application info for the page. The renderer responds back with
  // ViewHostMsg_DidGetApplicationInfo.
  IPC_MESSAGE_ROUTED1(ViewMsg_GetApplicationInfo, int32 /*page_id*/)

  // Requests the renderer to download the specified favicon image encode it as
  // PNG and send the PNG data back ala ViewHostMsg_DidDownloadFavIcon.
                      int /* identifier for the request */,
                      GURL /* URL of the image */,
                      int /* Size of the image. Normally 0, but set if you have
                             a preferred image size to request, such as when
                             downloading the favicon */)

  // When a renderer sends a ViewHostMsg_Focus to the browser process,
  // the browser has the option of sending a ViewMsg_CantFocus back to
  // the renderer.

  // Instructs the renderer to invoke the frame's shouldClose method, which
  // runs the onbeforeunload event handler.  Expects the result to be returned
  // via ViewHostMsg_ShouldClose.

  // Instructs the renderer to close the current page, including running the
  // onunload event handler. See the struct in render_messages.h for more.
  // Expects a ClosePage_ACK message when finished, where the parameters are
  // echoed back.

  // Asks the renderer to send back stats on the WebCore cache broken down by
  // resource types.

  // Asks the renderer to send back Histograms.
                       int /* sequence number of Renderer Histograms. */)

#if defined(USE_TCMALLOC)
  // Asks the renderer to send back tcmalloc stats.

  // Asks the renderer to send back V8 heap stats.

  // Notifies the renderer about ui theme changes

  // Notifies the renderer that a paint is to be generated for the rectangle
  // passed in.
                      gfx::Size /* The view size to be repainted */)

  // Posts a message to the renderer.
                      std::string /* The message */,
                      std::string /* The origin */,
                      std::string /* The target*/)

  // Sent to the renderer when a popup window should no longer count against
  // the current popup count (either because it's not a popup or because it was
  // a generated by a user action or because a constrained popup got turned
  // into a full window).

  // The browser sends this to a renderer process in response to a
  // ViewHostMsg_EstablishGpuChannel message.
                       IPC::ChannelHandle /* handle to channel */)

  // Notifies the renderer of the appcache that has been selected for a
  // a particular host. This is sent in reply to AppCacheMsg_SelectCache.
                       int /* host_id */,
                       int64 /* appcache_id */,

  // Notifies the renderer of an AppCache status change.
                       std::vector<int> /* host_ids */,

  // Notifies the renderer of an AppCache event other than the
  // progress event which has a seperate message.
                       std::vector<int> /* host_ids */,

  // Notifies the renderer of an AppCache progress event.
                       std::vector<int> /* host_ids */,
                       GURL /* url being processed */,
                       int /* total */,
                       int /* complete */)

  // Notifies the renderer of an AppCache error event.
                       std::vector<int> /* host_ids */,
                       std::string /* error_message */)

  // Notifies the renderer of an AppCache logging message.
                       int /* host_id */,
                       int /* log_level */,
                       std::string /* message */)

  // Notifies the renderer of the fact that AppCache access was blocked.
                       int /* host_id */,
                       GURL /* manifest_url */)

  // Reply to the ViewHostMsg_QueryFormFieldAutoFill message with the
  // AutoFill suggestions.
                      int /* id of the request message */,
                      std::vector<string16> /* names */,
                      std::vector<string16> /* labels */,
                      std::vector<string16> /* icons */,
                      std::vector<int> /* unique_ids */)

  // Reply to the ViewHostMsg_FillAutoFillFormData message with the
  // AutoFill form data.
                      int /* id of the request message */,
                      webkit_glue::FormData /* form data */)

  // Sent by the Browser process to alert a window about whether a it should
  // allow a scripted window.close(). The renderer assumes every new window is a
  // blocked popup until notified otherwise.
                      bool /* script_can_close */)

  // Sent by AudioRendererHost to renderer to request an audio packet.
                      int /* stream id */,
                      uint32 /* bytes in buffer */,
                      int64 /* message timestamp */)

  // Tell the renderer process that the audio stream has been created, renderer
  // process would be given a ShareMemoryHandle that it should write to from
  // then on.
                      int /* stream id */,
                      base::SharedMemoryHandle /* handle */,
                      uint32 /* length */)

  // Tell the renderer process that a low latency audio stream has been created,
  // renderer process would be given a SyncSocket that it should write to from
  // then on.
#if defined(OS_WIN)
                      int /* stream id */,
                      base::SharedMemoryHandle /* handle */,
                      base::SyncSocket::Handle /* socket handle */,
                      uint32 /* length */)
                      int /* stream id */,
                      base::SharedMemoryHandle /* handle */,
                      base::FileDescriptor /* socket handle */,
                      uint32 /* length */)

  // Notification message sent from AudioRendererHost to renderer for state
  // update after the renderer has requested a Create/Start/Close.
                      int /* stream id */,
                      ViewMsg_AudioStreamState_Params /* new state */)

                      int /* stream id */,
                      double /* volume */)

  // Notification that a move or resize renderer's containing window has
  // started.

  // The browser sends this message in response to all extension api calls.
                      int /* request_id */,
                      bool /* success */,
                      std::string /* response */,
                      std::string /* error */)

  // This message is optionally routed.  If used as a control message, it
  // will call a javascript function in every registered context in the
  // target process.  If routed, it will be restricted to the contexts that
  // are part of the target RenderView.
  // |args| is a list of primitive Value types that are passed to the function.
                      std::string /* function_name */,
                      ListValue /* args */,
                      bool /* requires incognito access */,
                      GURL /* event URL */)

  // Tell the renderer process all known extension function names.

  // Tell the renderer process which permissions the given extension has. See
  // Extension::Permissions for which elements correspond to which permissions.
                       std::string /* extension_id */,
                       std::vector<std::string> /* permissions */)

  // Tell the renderer process which host permissions the given extension has.
      GURL /* source extension's origin */,
      std::vector<URLPattern> /* URLPatterns the extension can access */)

  // Tell the renderer process that the given extension is enabled or disabled
  // for incognito mode.
                       std::string /* extension_id */,
                       bool /* enabled */)

  // Tell the renderer process all known page action ids for a particular
  // extension.
                       std::string /* extension_id */,
                       std::vector<std::string> /* page_action_ids */)

  // Changes the text direction of the currently selected input field (if any).
                      WebKit::WebTextDirection /* direction */)

  // Tells the renderer to clear the focused node (if any).

  // Make the RenderView transparent and render it onto a custom background. The
  // background will be tiled in both directions if it is not large enough.
                      SkBitmap /* background */)

  // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
  // ViewHostMsg_ShowWidget to inform the renderer that the browser has
  // processed the move.  The browser may have ignored the move, but it finished
  // processing.  This is used because the renderer keeps a temporary cache of
  // the widget position while these asynchronous operations are in progress.

  // Used to instruct the RenderView to send back updates to the preferred size.
  IPC_MESSAGE_ROUTED1(ViewMsg_EnablePreferredSizeChangedMode, int /*flags*/)

  // Used to tell the renderer not to add scrollbars with height and
  // width below a threshold.
                      gfx::Size /* disable_scrollbar_size_limit */)

  // Used to inform the renderer that the browser has displayed its
  // requested notification.
                      int /* notification_id */)

  // Used to inform the renderer that the browser has encountered an error
  // trying to display a notification.
                      int /* notification_id */,
                      string16 /* message */)

  // Informs the renderer that the one if its notifications has closed.
                      int /* notification_id */,
                      bool /* by_user */)

  // Informs the renderer that the one if its notifications has closed.
                      int /* request_id */)

  // Activate/deactivate the RenderView (i.e., set its controls' tint
  // accordingly, etc.).
                      bool /* active */)

#if defined(OS_MACOSX)
  // Let the RenderView know its window has changed visibility.
                      bool /* visibile */)

  // Let the RenderView know its window's frame has changed.
                      gfx::Rect /* window frame */,
                      gfx::Rect /* content view frame */)

  // Response message to ViewHostMsg_CreateShared/DedicatedWorker.
  // Sent when the worker has started.

  // Tell the renderer which browser window it's being attached to.
                      int /* id of browser window */)

  // Tell the renderer which type this view is.
                      ViewType::Type /* view_type */)

  // Notification that renderer should run some JavaScript code.

  // Notifies the child process of the new database size
                       string16 /* the origin */,
                       string16 /* the database name */,
                       int64 /* the new database size */,
                       int64 /* space available to origin */)

  // Asks the child process to close a database immediately
                       string16 /* the origin */,
                       string16 /* the database name */)

  // Storage events are broadcast to renderer processes.

  // IDBCallback message handlers.
                       int32 /* response_id */)
                       int32 /* response_id */,
                       int32 /* idb_database_id */)
                       int32 /* response_id */,
                       IndexedDBKey /* indexed_db_key */)
                       int32 /* response_id */,
                       int32 /* idb_object_store_id */)
                       int32 /* response_id */,
                       int32 /* idb_index_id */)
                       int32 /* response_id */,
                       SerializedScriptValue /* serialized_script_value */)
                       int32 /* response_id */,
                       int /* code */,
                       string16 /* message */)

  // Tell the renderer process to begin or end IPC message logging.
                       bool /* on or off */)

  // Socket Stream messages:
  // These are messages from the browser to the SocketStreamHandle on
  // a renderer.

  // A |socket_id| is assigned by ViewHostMsg_SocketStream_Connect.
  // The Socket Stream is connected. The SocketStreamHandle should keep track
  // of how much it has pending (how much it has requested to be sent) and
  // shouldn't go over |max_pending_send_allowed| bytes.
                       int /* socket_id */,
                       int /* max_pending_send_allowed */)

  // |data| is received on the Socket Stream.
                       int /* socket_id */,
                       std::vector<char> /* data */)

  // |amount_sent| bytes of data requested by
  // ViewHostMsg_SocketStream_SendData has been sent on the Socket Stream.
                       int /* socket_id */,
                       int /* amount_sent */)

  // The Socket Stream is closed.
                       int /* socket_id */)

  // SpellChecker messages.

  // Passes some initialization params to the renderer's spellchecker. This can
  // be called directly after startup or in (async) response to a
  // RequestDictionary ViewHost message.
                       IPC::PlatformFileForTransit /* bdict_file */,
                       std::vector<std::string> /* custom_dict_words */,
                       std::string /* language */,
                       bool /* auto spell correct */)

  // A word has been added to the custom dictionary; update the local custom
  // word list.
                       std::string /* word */)

  // Toggle the auto spell correct functionality.
                       bool /* enable */)

  // Executes custom context menu action that was provided from WebKit.
                      unsigned /* action */)

  // Tells the renderer to translate the page contents from one language to
  // another.
                      int /* page id */,
                      std::string, /* the script injected in the page */
                      std::string, /* BCP 47/RFC 5646 language code the page
                                      is in */
                      std::string /* BCP 47/RFC 5646 language code to translate
                                     to */)

  // Tells the renderer to revert the text of translated page to its original
  // contents.
                      int /* page id */)

  // Reply in response to ViewHostMsg_Geolocation_RequestPermission.
                      int /* bridge_id */,
                      bool /* is_allowed */)

  // Sent after ViewHostMsg_Geolocation_StartUpdating iff the user has granted
  // permission and we have a position available or an error occurs (such as
  // permission denied, position unavailable, etc.)
                      Geoposition /* geoposition */)

  // Sent on process startup to indicate whether this process is running in
  // incognito mode.
                       bool /* is_incognito_processs */)

  // Notification that the list of extensions with web extents has been updated.

  // Request a tree of Accessibility data from the render process.

  // Relay a request from assistive technology to set focus to a given node.
                      int /* object id */)

  // Relay a request from assistive technology to perform the default action
  // on a given node.
                      int /* object id */)


// TabContents messages
// These are messages sent from the renderer to the browser process.

  // Sent by the renderer when it is creating a new window.  The browser creates
  // a tab for it and responds with a ViewMsg_CreatingNew_ACK.  If route_id is
  // MSG_ROUTING_NONE, the view couldn't be created.
                              int /* route_id */,
                              int64 /* cloned_session_storage_namespace_id */)

  // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
  // <select> dropdowns.  This message is sent to the TabContents that
  // contains the widget being created.
                              int /* opener_id */,
                              WebKit::WebPopupType /* popup type */,
                              int /* route_id */)

  // These two messages are sent to the parent RenderViewHost to display the
  // page/widget that was created by CreateWindow/CreateWidget.  routing_id
  // refers to the id that was returned from the Create message above.
  // The initial_position parameter is a rectangle in screen coordinates.
  // FUTURE: there will probably be flags here to control if the result is
  // in a new window.
                      int /* route_id */,
                      WindowOpenDisposition /* disposition */,
                      gfx::Rect /* initial_pos */,
                      bool /* opened_by_user_gesture */)

                      int /* route_id */,
                      gfx::Rect /* initial_pos */)

  // Message to show a popup menu using native cocoa controls (Mac only).

  // This message is sent after ViewHostMsg_ShowView to cause the RenderView
  // to run in a modal fashion until it is closed.

                       WebKit::WebCache::UsageStats /* stats */)

  // Indicates the renderer is ready in response to a ViewMsg_New or
  // a ViewMsg_CreatingNew_ACK.

  // Indicates the renderer process is gone.  This actually is sent by the
  // browser process to itself, but keeps the interface cleaner.

  // Sent by the renderer process to request that the browser close the view.
  // This corresponds to the window.close() API, and the browser may ignore
  // this message.  Otherwise, the browser will generates a ViewMsg_Close
  // message to close the view.

  // Sent by the renderer process to request that the browser move the view.
  // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
  // the browser may ignore this message.
                      gfx::Rect /* position */)

  // Notifies the browser that a frame in the view has changed. This message
  // has a lot of parameters and is packed/unpacked by functions defined in
  // render_messages.h.

  // Notifies the browser that we have session history information.
  // page_id: unique ID that allows us to distinguish between history entries.
                      int32 /* page_id */,
                      std::string /* state */)

  // Notifies the browser that a document has been loaded in a frame.

  // Changes the title for the page in the UI when the page is navigated or the
  // title changes.
  // TODO(darin): use a UTF-8 string to reduce data size
  IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle, int32, std::wstring)

  // Changes the icon url for the page in the UI.
  IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL, int32, GURL)

  // Change the encoding name of the page in UI when the page has detected
  // proper encoding name.
                      std::string /* new encoding name */)

  // Notifies the browser that we want to show a destination url for a potential
  // action (e.g. when the user is hovering over a link).
  IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, int32, GURL)

  // Sent when the renderer starts loading the page. This corresponds to
  // WebKit's notion of the throbber starting. Note that sometimes you may get
  // duplicates of these during a single load.

  // Sent when the renderer is done loading a page. This corresponds to WebKit's
  // noption of the throbber stopping.

  // Sent when the document element is available for the toplevel frame.  This
  // happens after the page starts loading, but before all resources are
  // finished.

  // Sent when after the onload handler has been invoked for the document
  // in the toplevel frame.

  // Sent when the renderer loads a resource from its memory cache.
  // The security info is non empty if the resource was originally loaded over
  // a secure connection.
  // Note: May only be sent once per URL per frame per committed load.
                      GURL /* url */,
                      std::string  /* frame_origin */,
                      std::string  /* main_frame_origin */,
                      std::string  /* security info */)

  // Sent when the renderer displays insecure content in a secure page.

  // Sent when the renderer runs insecure content in a secure origin.
                      std::string  /* security_origin */)

  // Sent when the renderer starts a provisional load for a frame.
                      bool /* true if it is the main frame */,
                      GURL /* url */)

  // Sent when the renderer fails a provisional load with an error.
                      bool /* true if it is the main frame */,
                      int /* error_code */,
                      GURL /* url */,
                      bool /* true if the failure is the result of
                              navigating to a POST again and we're going to
                              show the POST interstitial */ )

  // Tells the render view that a ViewHostMsg_PaintAtSize message was
  // processed, and the DIB is ready for use. |tag| has the same value that
  // the tag sent along with ViewMsg_PaintAtSize.
                      int /* tag */,
                      gfx::Size /* size */)

  // Sent to update part of the view.  In response to this message, the host
  // generates a ViewMsg_UpdateRect_ACK message.

  // Sent to create, update and destroy video layers.
                      gfx::Size /* size */)
                      TransportDIB::Id /* bitmap */,
                      gfx::Rect /* bitmap_rect */)

  // Sent by the renderer when GPU compositing is enabled or disabled to notify
  // the browser whether or not is should do paiting.
                      bool /* true if the GPU process renders to window */)

  // Acknowledges receipt of a ViewMsg_HandleInputEvent message.
  // Payload is a WebInputEvent::Type which is the type of the event, followed
  // by an optional WebInputEvent which is provided only if the event was not
  // processed.


  // Returns the window location of the given window.
  // TODO(shess): Provide a mapping from reply_msg->routing_id() to
  // HWND so that we can eliminate the NativeViewId parameter.
                             gfx::NativeViewId /* window */,
                             gfx::Rect /* Out: Window location */)

  IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor)
  // Result of string search in the page.
  // Response to ViewMsg_Find with the results of the requested find-in-page
  // search, the number of matches found and the selection rect (in screen
  // coordinates) for the string found. If |final_update| is false, it signals
  // that this is not the last Find_Reply message - more will be sent as the
  // scoping effort continues.
                      int /* request_id */,
                      int /* number of matches */,
                      gfx::Rect /* selection_rect */,
                      int /* active_match_ordinal */,
                      bool /* final_update */)

  // Makes a resource request via the browser.
                      int /* request_id */,

  // Cancels a resource request with the ID given as the parameter.
                      int /* request_id */)

  // Follows a redirect that occured for the resource request with the ID given
  // as the parameter.
                      int /* request_id */,
                      bool /* has_new_first_party_for_cookies */,
                      GURL /* new_first_party_for_cookies */)

  // Makes a synchronous resource request via the browser.
                             int /* request_id */,

  // Used to set a cookie.  The cookie is set asynchronously, but will be
  // available to a subsequent ViewHostMsg_GetCookies request.
                      GURL /* url */,
                      GURL /* first_party_for_cookies */,
                      std::string /* cookie */)

  // Used to get cookies for the given URL.  This may be blocked by a user
  // prompt to validate a previous SetCookie message.
                             GURL /* url */,
                             GURL /* first_party_for_cookies */,
                             std::string /* cookies */)

  // Used to get raw cookie information for the given URL.  This may be blocked
  // by a user prompt to validate a previous SetCookie message.
                             GURL /* url */,
                             GURL /* first_party_for_cookies */,
                                 /* raw_cookies */)

  // Used to delete cookie for the given URL and name
                              GURL /* url */,
                              std::string /* cookie_name */)

  // Used to get raw cookie information for the given URL
                              GURL /* url */,
                              GURL /* first_party_for_cookies */,
                              bool /* enabled */)

  // Used to get the list of plugins
                              bool /* refresh*/,
                              std::vector<WebPluginInfo> /* plugins */)

  // Returns a path to a plugin for the given url and mime type.  If there's
  // no plugin, an empty string is returned.
                              GURL /* url */,
                              GURL /* policy_url */,
                              std::string /* mime_type */,
                              FilePath /* filename */,
                              std::string /* actual mime type for url */)

  // Requests spellcheck for a word.
                             string16 /* word to check */,
                             int /* document tag*/,
                             int /* misspell location */,
                             int /* misspell length */)

  // Asks the browser for a unique document tag.
                             int /* the tag */)

  // This message tells the spellchecker that a document, identified by an int
  // tag, has been closed and all of the ignored words for that document can be
  // forgotten.
                      int /* the tag */)

  // Tells the browser to display or not display the SpellingPanel
                      bool /* if true, then show it, otherwise hide it*/)

  // Tells the browser to update the spelling panel with the given word.
                      string16 /* the word to update the panel with */)

  // Tells the browser that content in the current page was blocked due to the
  // user's content settings.
                      ContentSettingsType /* type of blocked content */)

  // Tells the browser that  a specific Appcache manifest in the current page
  // was accessed.
                      GURL /* manifest url */,
                      bool /* blocked by policy */)

  // Tells the browser that a specific Web database in the current page was
  // accessed.
                      GURL /* origin url */,
                      string16 /* database name */,
                      string16 /* database display name */,
                      unsigned long /* estimated size */,
                      bool /* blocked by policy */)

  // Initiates a download based on user actions like 'ALT+click'.
                      GURL /* url */,
                      GURL /* referrer */)

  // Used to go to the session history entry at the given offset (ie, -1 will
  // return the "back" item).
                      int /* offset (from current) of history item to get */)

                             std::wstring /* in - alert message */,
                             std::wstring /* in - default prompt */,
                             GURL         /* in - originating page URL */,
                             int          /* in - dialog flags */,
                             bool         /* out - success */,
                             std::wstring /* out - prompt field */)

  // Provides the contents for the given page that was loaded recently.
                      GURL         /* URL of the page */,
                      int32        /* page id */,
                      string16     /* page contents */,
                      std::string  /* page ISO639_1 language code */,
                      bool         /* whether the page can be translated */)

  // Used to get the extension message bundle.
                              std::string /* extension id */,
                              SubstitutionMap /* message bundle */)

  // Specifies the URL as the first parameter (a wstring) and thumbnail as
  // binary data as the second parameter.
                      GURL /* url */,
                      ThumbnailScore /* score */,
                      SkBitmap /* bitmap */)

  // Send a snapshot of the tab contents to the render host.
                      SkBitmap /* bitmap */)

  // Notification that the url for the favicon of a site has been determined.
                      int32 /* page_id */,
                      GURL /* url of the favicon */)

  // Used to tell the parent that the user right clicked on an area of the
  // content area, and a context menu should be shown for it. The params
  // object contains information about the node(s) that were selected when the
  // user right clicked.
  IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, ContextMenuParams)

  // Requests that the given URL be opened in the specified manner.
                      GURL /* url */,
                      GURL /* referrer */,
                      WindowOpenDisposition /* disposition */)

  // Notifies that the preferred size of the content changed.
                      gfx::Size /* pref_size */)

  // Following message is used to communicate the values received by the
  // callback binding the JS to Cpp.
  // An instance of browser that has an automation host listening to it can
  // have a javascript send a native value (string, number, boolean) to the
  // listener in Cpp. (DomAutomationController)
                      std::string  /* json_string */,
                      int  /* automation_id */)

  // A message from HTML-based UI.  When (trusted) Javascript calls
  // send(message, args), this message is sent to the browser.
                      GURL /* source_url */,
                      std::string  /* message */,
                      std::string  /* args (as a JSON string) */)

  // A message for an external host.
                      std::string  /* message */,
                      std::string  /* origin */,
                      std::string  /* target */)

  // A renderer sends this to the browser process when it wants to
  // create a plugin.  The browser will create the plugin process if
  // necessary, and will return a handle to the channel on success.
  // On error an empty string is returned.
                              GURL /* url */,
                              std::string /* mime_type */,
                              std::wstring /* locale */,
                              IPC::ChannelHandle /* handle to channel */,
                              WebPluginInfo /* info */)

  // A renderer sends this to the browser process when it wants to
  // create connect to the GPU.  The browser will create the GPU process if
  // necessary, and will return a handle to the channel via
  // a GpuChannelEstablished message.

  // A renderer sends this to the browser process to provide a synchronization
  // point for GPU operations, in particular to make sure the GPU channel has
  // been established.

  // A renderer sends this to the browser process when it wants to start
  // a new instance of the Native Client process. The browser will launch
  // the process and return a handle to an IMC channel.
                              std::wstring /* url for the NaCl module */,
                              int /* channel number */,
                              nacl::FileDescriptor /* imc channel handle */,
                              base::ProcessHandle /* NaCl process handle */,
                              base::ProcessId /* NaCl process id */)

#if defined(USE_X11)
  // A renderer sends this when it needs a browser-side widget for
  // hosting a windowed plugin. id is the XID of the plugin window, for which
  // the container is created.
                             gfx::PluginWindowHandle /* id */)

  // Destroy a plugin container previously created using CreatePluginContainer.
  // id is the XID of the plugin window corresponding to the container that is
  // to be destroyed.
                             gfx::PluginWindowHandle /* id */)

  // Clipboard IPC messages

  // This message is used when the object list does not contain a bitmap.
      Clipboard::ObjectMap /* objects */)
  // This message is used when the object list contains a bitmap.
  // It is synchronized so that the renderer knows when it is safe to
  // free the shared memory used to transfer the bitmap.
      Clipboard::ObjectMap /* objects */,
      base::SharedMemoryHandle /* bitmap handle */)
                              std::string /* format */,
                              Clipboard::Buffer /* buffer */,
                              bool /* result */)
                              Clipboard::Buffer /* buffer */,
                              string16 /* result */)
                              Clipboard::Buffer  /* buffer */,
                              std::string /* result */)
                              Clipboard::Buffer  /* buffer */,
                              string16 /* markup */,
                              GURL /* url */)

                              Clipboard::Buffer /* buffer */,
                              bool /* result */,
                              std::vector<string16> /* types */,
                              bool /* contains filenames */)
                              Clipboard::Buffer /* buffer */,
                              string16 /* type */,
                              bool /* succeeded */,
                              string16 /* data */,
                              string16 /* metadata */)
                              Clipboard::Buffer /* buffer */,
                              bool /* result */,
                              std::vector<string16> /* filenames */)

#if defined(OS_MACOSX)
      string16 /* text */)

  // Request that the browser load a font into shared memory for us.
                             FontDescriptor /* font to load */,
                             uint32 /* buffer size */,
                             base::SharedMemoryHandle /* font data */)

#if defined(OS_WIN)
  // Request that the given font be loaded by the browser so it's cached by the
  // OS. Please see ChildProcessHost::PreCacheFont for details.
                              LOGFONT /* font data */)
#endif  // defined(OS_WIN)

  // Returns WebScreenInfo corresponding to the view.
  // TODO(shess): Provide a mapping from reply_msg->routing_id() to
  // HWND so that we can eliminate the NativeViewId parameter.
                             gfx::NativeViewId /* view */,
                             WebKit::WebScreenInfo /* results */)

  // Send the tooltip text for the current mouse position to the browser.
                      std::wstring /* tooltip text string */,
                      WebKit::WebTextDirection /* text direction hint */)

  // Notification that the text selection has changed.
                      std::string /* currently selected text */)

  // Asks the browser to display the file chooser.  The result is returned in a
  // ViewHost_RunFileChooserResponse message.

  // Notification that forms have been seen that are candidates for
  // filling/submitting by the AutoFillManager.
                      std::vector<webkit_glue::FormData> /* forms */)

  // Notification that password forms have been seen that are candidates for
  // filling/submitting by the password manager.
                      std::vector<webkit_glue::PasswordForm> /* forms */)

  // Notification that initial layout has occurred and the following password
  // forms are visible on the page (e.g. not set to display:none.)
                      std::vector<webkit_glue::PasswordForm> /* forms */)

  // Notification that a form has been submitted.  The user hit the button.
                      webkit_glue::FormData /* form */)

  // Used to tell the parent the user started dragging in the content area. The
  // WebDropData struct contains contextual information about the pieces of the
  // page the user dragged. The parent uses this notification to initiate a
  // drag session at the OS level.
                      WebDropData /* drop_data */,
                      WebKit::WebDragOperationsMask /* ops_allowed */,
                      SkBitmap /* image */,
                      gfx::Point /* image_offset */)

  // The page wants to update the mouse cursor during a drag & drop operation.
  // |is_drop_target| is true if the mouse is over a valid drop target.
                      WebKit::WebDragOperation /* drag_operation */)

  // Tells the browser to move the focus to the next (previous if reverse is
  // true) focusable element.
  IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, bool /* reverse */)

  // Notification that the page has an OpenSearch description document
  // associated with it.
                      int32 /* page_id */,
                      GURL /* url of OS description document */,
                      bool /* autodetected */)

  // Find out if the given url's security origin is installed as a search
  // provider.
      ViewHostMsg_GetSearchProviderInstallState_Params /* install */)

  // Required for updating text input state.
                      WebKit::WebTextInputType, /* text_input_type */
                      gfx::Rect /* caret_rect */)

  // Required for cancelling an ongoing input method composition.

  // Tells the browser that the renderer is done calculating the number of
  // rendered pages according to the specified settings.
                      int /* rendered document cookie */,
                      int /* number of rendered pages */)

  // Sends back to the browser the rendered "printed page" that was requested by
  // a ViewMsg_PrintPage message or from scripted printing. The memory handle in
  // this message is already valid in the browser process.
                      ViewHostMsg_DidPrintPage_Params /* page content */)

  // The renderer wants to know the default print settings.
                             ViewMsg_Print_Params /* default_settings */)

#if defined(OS_WIN) || defined(OS_MACOSX)
  // It's the renderer that controls the printing process when it is generated
  // by javascript. This step is about showing UI to the user to select the
  // final print settings. The output parameter is the same as
  // ViewMsg_PrintPages which is executed implicitly.
                                 /* settings chosen by the user*/)
#endif  // defined(OS_WIN) || defined(OS_MACOSX)

  // WebKit and JavaScript error messages to log to the console
  // or debugger UI.
                      std::wstring, /* msg */
                      int32, /* line number */
                      std::wstring /* source id */)

  // Stores new inspector setting in the profile.
                      std::string,  /* key */
                      std::string /* value */)

  // Wraps an IPC message that's destined to the DevToolsClient on
  // DevToolsAgent->browser hop.
                      IPC::Message /* one of DevToolsClientMsg_XXX types */)

  // Wraps an IPC message that's destined to the DevToolsAgent on
  // DevToolsClient->browser hop.
                      IPC::Message /* one of DevToolsAgentMsg_XXX types */)

  // Activates (brings to the front) corresponding dev tools window.

  // Closes dev tools window that is inspecting current render_view_host.

  // Attaches dev tools window that is inspecting current render_view_host.

  // Detaches dev tools window that is inspecting current render_view_host.

  // Updates runtime features store in devtools manager in order to support
  // cross-navigation instrumentation.
                      std::string /* feature */,
                      bool /* enabled */)

  // Send back a string to be recorded by UserMetrics.
                      std::string /* action */)

  // Send back histograms as vector of pickled-histogram strings.
                       int, /* sequence number of Renderer Histograms. */

#if defined USE_TCMALLOC
  // Send back tcmalloc stats output.
                       int          /* pid */,
                       std::string  /* tcmalloc debug output */)

  // Sends back stats about the V8 heap.
                       int /* size of heap (allocated from the OS) */,
                       int /* bytes in use */)

  // Request for a DNS prefetch of the names in the array.
  // NameList is typedef'ed std::vector<std::string>
                      std::vector<std::string> /* hostnames */)

  // Notifies when default plugin updates status of the missing plugin.
                      int /* status */)

  // Sent by the renderer process to indicate that a plugin instance has
  // crashed.
                      FilePath /* plugin_path */)

  // Displays a JavaScript out-of-memory message in the infobar.

  // Displays a box to confirm that the user wants to navigate away from the
  // page. Replies true if yes, false otherwise, the reply string is ignored,
  // but is included so that we can use OnJavaScriptMessageBoxClosed.
                             GURL,        /* in - originating frame URL */
                             std::wstring /* in - alert message */,
                             bool         /* out - success */,
                             std::wstring /* out - This is ignored.*/)

                      std::vector<GURL> /* all savable resource links */,
                      std::vector<GURL> /* all referrers of resource links */,
                      std::vector<GURL> /* all frame links */)

                      GURL /* frame's url */,
                      std::string /* data buffer */,
                      int32 /* complete status */)

                             GURL /* url */,
                             int /* width */,
                             int /* height */,
                             std::string /* json_arguments */,
                             std::string /* json_retval */)

                      int32 /* page_id */,

  // Provides the result from running OnMsgShouldClose.  |proceed| matches the
  // return value of the the frame's shouldClose method (which includes the
  // onbeforeunload handler): true if the user decided to proceed with leaving
  // the page.
                      bool /* proceed */)

  // Indicates that the current page has been closed, after a ClosePage
  // message. The parameters are just echoed from the ClosePage request.

                      int /* Identifier of the request */,
                      GURL /* URL of the image */,
                      bool /* true if there was a network error */,
                      SkBitmap /* image_data */)

  // Sent to query MIME information.
                              FilePath::StringType /* extension */,
                              std::string /* mime_type */)
                              FilePath /* file_path */,
                              std::string /* mime_type */)
                              std::string /* mime_type */,
                              FilePath::StringType /* extension */)

  // Get the CPBrowsingContext associated with the renderer sending this
  // message.
                              uint32 /* context */)

  // Sent when the renderer process is done processing a DataReceived
  // message.
                      int /* request_id */)

  // Sent when a provisional load on the main frame redirects.
                      int /* page_id */,
                      GURL /* last url */,
                      GURL /* url redirected to */)

  // Sent by the renderer process to acknowledge receipt of a
  // DownloadProgress message.
                      int /* request_id */)

  // Sent by the renderer process to acknowledge receipt of a
  // UploadProgress message.
                      int /* request_id */)

  // Sent when the renderer changes the zoom level for a particular url, so the
  // browser can update its records.
                       GURL /* url */,
                       int /* zoom_level */)

#if defined(OS_WIN)
  // Duplicates a shared memory handle from the renderer to the browser. Then
  // the renderer can flush the handle.
                             base::SharedMemoryHandle /* renderer handle */,
                             base::SharedMemoryHandle /* browser handle */)

#if defined(USE_X11)
  // Asks the browser to create a temporary file for the renderer to fill
  // in resulting NativeMetafile in printing.
                              base::FileDescriptor /* temp file fd */,
                              int /* fd in browser*/)
                       int /* fd in browser */)

#if defined(OS_MACOSX)
  // Asks the browser to create a block of shared memory for the renderer to
  // pass NativeMetafile data to the browser.
                             uint32 /* buffer size */,
                             base::SharedMemoryHandle /* browser handle */)

#if defined(OS_POSIX)
  // Asks the browser to create a block of shared memory for the renderer to
  // fill in and pass back to the browser.
                             uint32 /* buffer size */,
                             base::SharedMemoryHandle /* browser handle */)

  // Provide the browser process with information about the WebCore resource
  // cache.

  // Notify the browser that this render process can or can't be suddenly
  // terminated.
                       bool /* enabled */)

  // Returns the window location of the window this widget is embeded.
  // TODO(shess): Provide a mapping from reply_msg->routing_id() to
  // HWND so that we can eliminate the NativeViewId parameter.
                             gfx::NativeViewId /* window */,
                             gfx::Rect /* Out: Window location */)

  // Informs the browser of a new appcache host.
                       int /* host_id */)

  // Informs the browser of an appcache host being destroyed.
                       int /* host_id */)

  // Initiates the cache selection algorithm for the given host.
  // This is sent prior to any subresource loads. An AppCacheMsg_CacheSelected
  // message will be sent in response.
  // 'host_id' indentifies a specific document or worker
  // 'document_url' the url of the main resource
  // 'appcache_document_was_loaded_from' the id of the appcache the main
  //     resource was loaded from or kNoCacheId
  // 'opt_manifest_url' the manifest url specified in the <html> tag if any
                       int /* host_id */,
                       GURL  /* document_url */,
                       int64 /* appcache_document_was_loaded_from */,
                       GURL  /* opt_manifest_url */)

  // Initiates worker specific cache selection algorithm for the given host.
                       int /* host_id */,
                       int /* parent_process_id */,
                       int /* parent_host_id */)
                       int /* host_id */,
                       int64 /* appcache_id */)

  // Informs the browser of a 'foreign' entry in an appcache.
                       int /* host_id */,
                       GURL  /* document_url */,
                       int64 /* appcache_document_was_loaded_from */)

  // Returns the status of the appcache associated with host_id.
                              int /* host_id */,

  // Initiates an update of the appcache associated with host_id.
                              int /* host_id */,
                              bool /* success */)

  // Swaps a new pending appcache, if there is one, into use for host_id.
                              int /* host_id */,
                              bool /* success */)

  // Returns the resizer box location in the window this widget is embedded.
  // Important for Mac OS X, but not Win or Linux.
                             gfx::NativeViewId /* window */,
                             gfx::Rect /* Out: Window location */)

  // Queries the browser for AutoFill suggestions for a form input field.
                      int /* id of this message */,
                      bool /* form_autofilled */,
                      webkit_glue::FormField /* the form field */)

  // Instructs the browser to fill in the values for a form using AutoFill
  // profile data.
                      int /* id of this message */,
                      webkit_glue::FormData /* the form  */,
                      string16 /* profile name */,
                      string16 /* profile label */,
                      int /* profile unique ID */)

  // Instructs the browser to remove the specified Autocomplete entry from the
  // database.
                      string16 /* field name */,
                      string16 /* value */)

  // Instructs the browser to show the AutoFill dialog.

  // Get the list of proxies to use for |url|, as a semicolon delimited list
  // of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also
  // PluginProcessHostMsg_ResolveProxy which does the same thing.
                              GURL /* url */,
                              int /* network error */,
                              std::string /* proxy list */)

  // Request that got sent to browser for creating an audio output stream
                      int /* stream_id */,
                      bool /* low-latency */)

  // Tell the browser the audio buffer prepared for stream
  // (render_view_id, stream_id) is filled and is ready to be consumed.
                      int /* stream_id */,
                      uint32 /* packet size */)

  // Start buffering and play the audio stream specified by
  // (render_view_id, stream_id).
                      int /* stream_id */)

  // Pause the audio stream specified by (render_view_id, stream_id).
                      int /* stream_id */)

  // Discard all buffered audio data for the specified audio stream.
                      int /* stream_id */)

  // Close an audio stream specified by (render_view_id, stream_id).
                      int /* stream_id */)

  // Get audio volume of the stream specified by (render_view_id, stream_id).
                      int /* stream_id */)

  // Set audio volume of the stream specified by (render_view_id, stream_id).
  // TODO(hclam): change this to vector if we have channel numbers other than 2.
                      int /* stream_id */,
                      double /* volume */)

  // A renderer sends this message when an extension process starts an API
  // request. The browser will always respond with a ViewMsg_ExtensionResponse.
                      std::string /* name */,
                      ListValue /* arguments */,
                      GURL /* source_url */,
                      int /* callback id */,
                      bool /* has_callback */)

  // Notify the browser that this renderer added a listener to an event.
                       std::string /* name */)

  // Notify the browser that this renderer removed a listener from an event.
                       std::string /* name */)

#if defined(OS_MACOSX)
  // On OSX, we cannot allocated shared memory from within the sandbox, so
  // this call exists for the renderer to ask the browser to allocate memory
  // on its behalf. We return a file descriptor to the POSIX shared memory.
  // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
  // by the browser, and it is the caller's repsonsibility to send a
  // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
  // In all cases, the caller is responsible for deleting the resulting
  // TransportDIB.
                              size_t, /* bytes requested */
                              bool, /* cache in the browser */
                              TransportDIB::Handle /* DIB */)

  // Since the browser keeps handles to the allocated transport DIBs, this
  // message is sent to tell the browser that it may release them when the
  // renderer is finished with them.
                       TransportDIB::Id /* DIB id */)

  // Messages related to the GPU plugin on Mac OS X 10.6 and later

  // This is sent from the renderer to the browser to allocate a fake
  // PluginWindowHandle on the browser side which is used to identify
  // the plugin to the browser later when backing store is allocated
  // or reallocated. |opaque| indicates whether the plugin's output is
  // considered to be opaque, as opposed to translucent.
                             bool /* opaque */,
                             gfx::PluginWindowHandle /* id */)

  // Destroys a fake window handle previously allocated using
  // AllocateFakePluginWindowHandle.
                      gfx::PluginWindowHandle /* id */)

  // This message, used on Mac OS X 10.5 and earlier (no IOSurface support),
  // is sent from the renderer to the browser on behalf of the plug-in
  // to indicate that a new backing store was allocated for that plug-in
  // instance.
                      gfx::PluginWindowHandle /* window */,
                      int32 /* width */,
                      int32 /* height */,
                      TransportDIB::Handle /* handle for the DIB */)

  // This message, used on Mac OS X 10.6 and later (where IOSurface is
  // supported), is sent from the renderer to the browser on behalf of the
  // plug-in to indicate that a new backing store was allocated for that
  // plug-in instance.
  // NOTE: the original intent was to pass a mach port as the IOSurface
  // identifier but it looks like that will be a lot of work. For now we pass an
  // ID from IOSurfaceGetID.
                      gfx::PluginWindowHandle /* window */,
                      int32 /* width */,
                      int32 /* height */,
                      uint64 /* identifier for IOSurface */)

  // This message notifies the browser process that the plug-in
  // swapped the buffers associated with the given "window", which
  // should cause the browser to redraw the various plug-ins'
  // contents.
                      gfx::PluginWindowHandle /* window */)

  // A renderer sends this to the browser process when it wants to create a
  // worker.  The browser will create the worker process if necessary, and
  // will return the route id on success.  On error returns MSG_ROUTING_NONE.
                              int /* route_id */)

  // This message is sent to the browser to see if an instance of this shared
  // worker already exists. If so, it returns exists == true. If a
  // non-empty name is passed, also validates that the url matches the url of
  // the existing worker. If a matching worker is found, the passed-in
  // document_id is associated with that worker, to ensure that the worker
  // stays alive until the document is detached.
  // The route_id returned can be used to forward messages to the worker via
  // ForwardToWorker if it exists, otherwise it should be passed in to any
  // future call to CreateWorker to avoid creating duplicate workers.
                              bool /* exists */,
                              int /* route_id */,
                              bool /* url_mismatch */)

  // A renderer sends this to the browser process when a document has been
  // detached. The browser will use this to constrain the lifecycle of worker
  // processes (SharedWorkers are shut down when their last associated document
  // is detached).
                       unsigned long long /* document_id */)

  // A message sent to the browser on behalf of a renderer which wants to show
  // a desktop notification.
                      int /* notification_id */ )
                      GURL /* origin */,
                      int /* callback_context */)
                             GURL /* source page */,
                             int /* permission_result */)

  // Sent if the worker object has sent a ViewHostMsg_CreateDedicatedWorker
  // message and not received a ViewMsg_WorkerCreated reply, but in the
  // mean time it's destroyed.  This tells the browser to not create the queued
  // worker.
                       int /* route_id */)

  // Wraps an IPC message that's destined to the worker on the renderer->browser
  // hop.
                       IPC::Message /* message */)

  // Open a channel to all listening contexts owned by the extension with
  // the given ID.  This always returns a valid port ID which can be used for
  // sending messages.  If an error occurred, the opener will be notified
  // asynchronously.
                              int /* routing_id */,
                              std::string /* source_extension_id */,
                              std::string /* target_extension_id */,
                              std::string /* channel_name */,
                              int /* port_id */)

  // Get a port handle to the given tab.  The handle can be used for sending
  // messages to the extension.
                              int /* routing_id */,
                              int /* tab_id */,
                              std::string /* extension_id */,
                              std::string /* channel_name */,
                              int /* port_id */)

  // Send a message to an extension process.  The handle is the value returned
  // by ViewHostMsg_OpenChannelTo*.
                      int /* port_id */,
                      std::string /* message */)

  // Send a message to an extension process.  The handle is the value returned
  // by ViewHostMsg_OpenChannelTo*.
                       int /* port_id */)

  // Sent as a result of a focus change in the renderer (if accessibility is
  // enabled), to notify the browser side that its accessibility focus needs to
  // change as well. Takes the id of the accessibility object that now has
  // focus.
                      int /* accessibility object id */)

  // Send as a result of a state change in the renderer (if accessibility is
  // enabled), to notify the browser side. Takes the id of the accessibility
  // object that had a state change
                      int /* accessibility object id */)

  // Message sent from the renderer to the browser to request that the browser
  // close all sockets.  Used for debugging/testing.

  // Message sent from the renderer to the browser to request that the browser
  // enable or disable the cache.  Used for debugging/testing.
                       bool /* enabled */)

  // Message sent from the renderer to the browser to request that the browser
  // clear the cache.  Used for debugging/testing.
                              int /* result */)

  // Message sent from the renderer to the browser to request that the browser
  // cache |data| associated with |url|.
                       GURL /* url */,
                       double /* expected_response_time */,
                       std::vector<char> /* data */)

  // Get the storage area id for a particular origin within a namespace.
                              int64 /* namespace_id */,
                              string16 /* origin */,
                              int64 /* storage_area_id */)

  // Get the length of a storage area.
                              int64 /* storage_area_id */,
                              unsigned /* length */)

  // Get a the ith key within a storage area.
                              int64 /* storage_area_id */,
                              unsigned /* index */,
                              NullableString16 /* key */)

  // Get a value based on a key from a storage area.
                              int64 /* storage_area_id */,
                              string16 /* key */,
                              NullableString16 /* value */)

  // Set a value that's associated with a key in a storage area.
                             int64 /* storage_area_id */,
                             string16 /* key */,
                             string16 /* value */,
                             GURL /* url */,
                             WebKit::WebStorageArea::Result /* result */,
                             NullableString16 /* old_value */)

  // Remove the value associated with a key in a storage area.
                              int64 /* storage_area_id */,
                              string16 /* key */,
                              GURL /* url */,
                              NullableString16 /* old_value */)

  // Clear the storage area.
                              int64 /* storage_area_id */,
                              GURL /* url */,
                              bool /* something_cleared */)

  // WebIndexedDatabase::open() message.

  // WebIDBDatabase::name() message.
                              int32, /* idb_database_id */
                              string16 /* name */)

  // WebIDBDatabase::description() message.
                              int32, /* idb_database_id */
                              string16 /* description */)

  // WebIDBDatabase::version() message.
                              int32, /* idb_database_id */
                              string16 /* vesion */)

  // WebIDBDatabase::objectStores() message.
                              int32, /* idb_database_id */
                              std::vector<string16> /* objectStores */)

  // WebIDBDatabase::createObjectStore() message.

  // WebIDBDatabase::objectStore() message.
                              int32, /* idb_database_id */
                              string16, /* name */
                              int32, /* mode */
                              bool, /* success */
                              int32 /* idb_object_store_id */)

  // WebIDBDatabase::removeObjectStore() message.
                       int32, /* idb_database_id */
                       int32, /* response_id */
                       string16 /* name */)

  // WebIDBDatabase::~WebIDBDatabase() message.
                       int32 /* idb_database_id */)

  // WebIDBIndex::name() message.
                              int32, /* idb_index_id */
                              string16 /* name */)

  // WebIDBIndex::keyPath() message.
                              int32, /* idb_index_id */
                              NullableString16 /* key_path */)

  // WebIDBIndex::unique() message.
                              int32, /* idb_unique_id */
                              bool /* unique */)

  // WebIDBIndex::~WebIDBIndex() message.
                       int32 /* idb_index_id */)

  // WebIDBObjectStore::name() message.
                              int32, /* idb_object_store_id */
                              string16 /* name */)

  // WebIDBObjectStore::keyPath() message.
                              int32, /* idb_object_store_id */
                              NullableString16 /* keyPath */)

  // WebIDBObjectStore::indexNames() message.
                              int32, /* idb_object_store_id */
                              std::vector<string16> /* index_names */)

  // WebIDBObjectStore::get() message.
                       int32, /* idb_object_store_id */
                       int32, /* response_id */
                       IndexedDBKey /* key */)

  // WebIDBObjectStore::put() message.
                       int32, /* idb_object_store_id */
                       int32, /* response_id */
                       SerializedScriptValue, /* serialized_value */
                       IndexedDBKey, /* key */
                       bool /* add_only */)

  // WebIDBObjectStore::remove() message.
                       int32, /* idb_object_store_id */
                       int32, /* response_id */
                       IndexedDBKey /* key */)

  // WebIDBObjectStore::createIndex() message.

  // WebIDBObjectStore::index() message.
                              int32, /* idb_object_store_id */
                              string16, /* name */
                              bool, /* success */
                              int32 /* idb_index_id */)

  // WebIDBObjectStore::removeIndex() message.
                       int32, /* idb_object_store_id */
                       int32, /* response_id */
                       string16 /* name */)

  // WebIDBObjectStore::~WebIDBObjectStore() message.
                       int32 /* idb_object_store_id */)

  // Get file size in bytes. Set result to -1 if failed to get the file size.
                              FilePath /* path */,
                              int64 /* result */)

  // Get file modification time in seconds. Set result to 0 if failed to get the
  // file modification time.
                              FilePath /* path */,
                              base::Time /* result */)

  // Open the file.
                              FilePath /* path */,
                              int /* mode */,
                              IPC::PlatformFileForTransit /* result */)

  // Sent by the renderer process to acknowledge receipt of a
  // ViewMsg_CSSInsertRequest message and css has been inserted into the frame.

  // Sent by the renderer process to check whether access to web databases is
  // granted by content settings. This may block and trigger a cookie prompt.
                             std::string /* origin_url */,
                             string16 /* database name */,
                             string16 /* database display name */,
                             unsigned long /* estimated size */,
                             bool /* result */)

  // Asks the browser process to open a DB file with the given name.
                              string16 /* vfs file name */,
                              int /* desired flags */,
                              IPC::PlatformFileForTransit /* file_handle */)

  // Asks the browser process to delete a DB file
                       string16 /* vfs file name */,
                       bool /* whether or not to sync the directory */,
                              int /* SQLite error code */)

  // Asks the browser process to return the attributes of a DB file
                       string16 /* vfs file name */,
                              int32 /* the attributes for the given DB file */)

  // Asks the browser process to return the size of a DB file
                       string16 /* vfs file name */,
                              int64 /* the size of the given DB file */)

  // Notifies the browser process that a new database has been opened
                       string16 /* origin identifier */,
                       string16 /* database name */,
                       string16 /* database description */,
                       int64 /* estimated size */)

  // Notifies the browser process that a database might have been modified
                       string16 /* origin identifier */,
                       string16 /* database name */)

  // Notifies the browser process that a database is about to close
                       string16 /* origin identifier */,
                       string16 /* database name */)

  // Notifies the browser of the language (ISO 639_1 code language, such as fr,
  // en, zh...) of the current page.
                      std::string /* the language */)

  // Notifies the browser that a page has been translated.
                      int,                  /* page id */
                      std::string           /* the original language */,
                      std::string           /* the translated language */,
                      TranslateErrors::Type /* the error type if available */)

  // Socket Stream messages:
  // These are messages from the SocketStreamHandle to the browser.

  // Open new Socket Stream for the |socket_url| identified by |socket_id|
  // in the renderer process.
  // The browser starts connecting asynchronously.
  // Once Socket Stream connection is established, the browser will send
  // ViewMsg_SocketStream_Connected back.
                       GURL /* socket_url */,
                       int /* socket_id */)

  // Request to send data on the Socket Stream.
  // SocketStreamHandle can send data at most |max_pending_send_allowed| bytes,
  // which is given by ViewMsg_SocketStream_Connected at any time.
  // The number of pending bytes can be tracked by size of |data| sent
  // and |amount_sent| parameter of ViewMsg_SocketStream_DataSent.
  // That is, the following constraints is applied:
  //  (accumulated total of |data|) - (accumulated total of |amount_sent|)
  // <= |max_pending_send_allowed|
  // If the SocketStreamHandle ever tries to exceed the
  // |max_pending_send_allowed|, the connection will be closed.
                       int /* socket_id */,
                       std::vector<char> /* data */)

  // Request to close the Socket Stream.
  // The browser will send ViewMsg_SocketStream_Closed back when the Socket
  // Stream is completely closed.
                       int /* socket_id */)

  // Request for cryptographic operation messages:
  // These are messages from the renderer to the browser to perform a
  // cryptographic operation.

  // Asks the browser process to generate a keypair for grabbing a client
  // certificate from a CA (<keygen> tag), and returns the signed public
  // key and challenge string.
                              uint32 /* key size index */,
                              std::string /* challenge string */,
                              GURL /* URL of requestor */,
                              std::string /* signed public key and challenge */)

  // The renderer has tried to spell check a word, but couldn't because no
  // dictionary was available to load. Request that the browser find an
  // appropriate dictionary and return it.

                              string16 /* word */,
                              int /* document tag */,
                              bool /* correct */)

      string16 /* word */,
      std::vector<string16> /* suggestions */)

  // Geolocation services messages

  // A GeolocationServiceBridgeImpl in the renderer process has been created.
  // This is used to lazily initialize the host dispatchers and related
  // Geolocation infrastructure in the browser process.
                       int /* render_view_id */)

  // A GeolocationServiceBridgeImpl has been destroyed.
  // This is used to let the Geolocation infrastructure do its cleanup.
                       int /* render_view_id */)

  // The |render_view_id| and |bridge_id| representing |host| is requesting
  // permission to access geolocation position.
  // This will be replied by ViewMsg_Geolocation_PermissionSet.
                       int /* render_view_id */,
                       int /* bridge_id */,
                       GURL /* GURL of the frame requesting geolocation */)

  // The |render_view_id| and |bridge_id| representing |GURL| is cancelling its
  // previous permission request to access geolocation position.
                       int /* render_view_id */,
                       int /* bridge_id */,
                       GURL /* GURL of the frame */)

  // The |render_view_id| and |bridge_id| requests Geolocation service to start
  // updating.
  // This is an asynchronous call, and the browser process may eventually reply
  // with the updated geoposition, or an error (access denied, location
  // unavailable, etc.)
                       int /* render_view_id */,
                       int /* bridge_id */,
                       GURL /* GURL of the frame requesting geolocation */,
                       bool /* enable_high_accuracy */)

  // The |render_view_id| and |bridge_id| requests Geolocation service to stop
  // updating.
  // Note that the geolocation service may continue to fetch geolocation data
  // for other origins.
                       int /* render_view_id */,
                       int /* bridge_id */)

  // The |render_view_id| and |bridge_id| requests Geolocation service to
  // suspend.
  // Note that the geolocation service may continue to fetch geolocation data
  // for other origins.
                       int /* render_view_id */,
                       int /* bridge_id */)

  // The |render_view_id| and |bridge_id| requests Geolocation service to
  // resume.
                       int /* render_view_id */,
                       int /* bridge_id */)

  // Send the tree of accessibility data to the browser, where it's cached
  // in order to respond to OS accessibility queries immediately.

  // Notifies the TabContents that the content being displayed is PDF.
  // This allows the browser to handle things such as zooming differently.


Generated by  Doxygen 1.6.0   Back to index