// Copyright (c) 2011 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. // Multiply-included file, no traditional include guard. #include #include #include #include // TODO(erg): This list has been temporarily annotated by erg while doing work // on which headers to pull out. #include "base/basictypes.h" #include "base/file_path.h" #include "base/nullable_string16.h" #include "base/platform_file.h" #include "base/process.h" #include "base/ref_counted.h" #include "base/shared_memory.h" #include "base/string16.h" #include "base/sync_socket.h" #include "base/values.h" #include "build/build_config.h" #include "chrome/common/common_param_traits.h" #include "chrome/common/content_settings.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_extent.h" #include "chrome/common/extensions/url_pattern.h" #include "chrome/common/instant_types.h" #include "chrome/common/nacl_types.h" #include "chrome/common/render_messages_params.h" #include "chrome/common/thumbnail_score.h" #include "chrome/common/translate_errors.h" #include "chrome/common/view_types.h" #include "chrome/common/web_apps.h" #include "chrome/common/webkit_param_traits.h" #include "chrome/common/window_container_type.h" #include "content/common/common_param_traits.h" #include "content/common/css_colors.h" #include "content/common/notification_type.h" #include "content/common/page_transition_types.h" #include "content/common/page_zoom.h" #include "content/common/resource_response.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_utils.h" #include "ipc/ipc_platform_file.h" // ifdefed typedef. #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/rect.h" #include "webkit/glue/webaccessibility.h" #include "webkit/glue/webcookie.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webdropdata.h" #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugininfo.h" #if defined(OS_POSIX) #include "base/file_descriptor_posix.h" #endif #if defined(OS_MACOSX) #include "content/common/font_descriptor_mac.h" #endif // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes // more sense with our current design. // Singly-included section, not yet converted. #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ #define CHROME_COMMON_RENDER_MESSAGES_H_ // 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 SubstitutionMap; // Values that may be OR'd together to form the 'flags' parameter of the // ViewMsg_EnablePreferredSizeChangedMode message. enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { kPreferredSizeNothing, kPreferredSizeWidth = 1 << 0, // Requesting the height currently requires a polling loop in render_view.cc. kPreferredSizeHeightThisIsSlow = 1 << 1, }; // Command values for the cmd parameter of the // ViewHost_JavaScriptStressTestControl message. For each command the parameter // passed has a different meaning: // For the command kJavaScriptStressTestSetStressRunType the parameter it the // type taken from the enumeration v8::Testing::StressType. // For the command kJavaScriptStressTestPrepareStressRun the parameter it the // number of the stress run about to take place. enum ViewHostMsg_JavaScriptStressTestControl_Commands { kJavaScriptStressTestSetStressRunType = 0, kJavaScriptStressTestPrepareStressRun = 1, }; namespace IPC { #if defined(OS_MACOSX) // Traits for FontDescriptor structure to pack/unpack. template <> struct ParamTraits { typedef FontDescriptor param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; #endif template <> struct ParamTraits { typedef webkit::npapi::WebPluginGeometry param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. template <> struct ParamTraits { typedef webkit::npapi::WebPluginMimeType param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> struct ParamTraits { typedef webkit::npapi::WebPluginInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; // Traits for WebDropData template <> struct ParamTraits { typedef WebDropData param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; #if defined(OS_POSIX) // TODO(port): this shouldn't exist. However, the plugin stuff is really using // HWNDS (NativeView), and making Windows calls based on them. I've not figured // out the deal with plugins yet. template <> struct ParamTraits { typedef gfx::NativeView param_type; static void Write(Message* m, const param_type& p) { NOTIMPLEMENTED(); } static bool Read(const Message* m, void** iter, param_type* p) { NOTIMPLEMENTED(); *p = NULL; return true; } static void Log(const param_type& p, std::string* l) { l->append(base::StringPrintf("")); } }; #endif // defined(OS_POSIX) template <> struct SimilarTypeTraits { typedef int Type; }; // Traits for URLPattern. template <> struct ParamTraits { typedef URLPattern param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; // Traits for WebCookie template <> struct ParamTraits { typedef webkit_glue::WebCookie param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; template <> struct SimilarTypeTraits { typedef int Type; }; template <> struct SimilarTypeTraits { typedef int Type; }; template <> struct ParamTraits { typedef ExtensionExtent param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; template <> struct ParamTraits { typedef webkit_glue::WebAccessibility param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); }; } // namespace IPC #endif // CHROME_COMMON_RENDER_MESSAGES_H_ #define IPC_MESSAGE_START ChromeMsgStart //----------------------------------------------------------------------------- // RenderView messages // These are messages sent from the browser to the renderer process. // Tells the renderer to set its maximum cache size to the supplied value. IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities, size_t /* min_dead_capacity */, size_t /* max_dead_capacity */, size_t /* capacity */) // Tells the renderer to clear the cache. IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache) // 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. IPC_MESSAGE_CONTROL0(ViewMsg_PurgeMemory) // Tells the render view to capture a thumbnail image of the page. The // render view responds with a ViewHostMsg_Snapshot. IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot) IPC_MESSAGE_ROUTED0(ViewMsg_PrintNodeUnderContextMenu) // Tells the renderer to print the print preview tab's PDF plugin without // showing the print dialog. IPC_MESSAGE_ROUTED1(ViewMsg_PrintForPrintPreview, DictionaryValue /* settings*/) // 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. IPC_MESSAGE_ROUTED0(ViewMsg_PrintPages) // Tells the render view that printing is done so it can clean up. IPC_MESSAGE_ROUTED2(ViewMsg_PrintingDone, int /* document_cookie */, bool /* success */) // Tells the render view to switch the CSS to print media type, renders every // requested pages for print preview using the given |settngs|. IPC_MESSAGE_ROUTED1(ViewMsg_PrintPreview, DictionaryValue /* settings */) // Tells a renderer to stop blocking script initiated printing. IPC_MESSAGE_ROUTED0(ViewMsg_ResetScriptedPrintCount) // Sends back to the browser the rendered "printed document" for preview that // was requested by a ViewMsg_PrintPreview message. The memory handle in this // message is already valid in the browser process. IPC_MESSAGE_ROUTED1(ViewHostMsg_PagesReadyForPreview, ViewHostMsg_DidPreviewDocument_Params /* params */) // 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) // 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. IPC_MESSAGE_CONTROL0(ViewMsg_VisitedLink_Reset) // 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. IPC_MESSAGE_CONTROL1(ViewMsg_UserScripts_UpdatedScripts, base::SharedMemoryHandle) // 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. IPC_MESSAGE_CONTROL0(ViewMsg_SignalCookiePromptEvent) // 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. IPC_MESSAGE_ROUTED0(ViewMsg_SetupDevToolsClient) // 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. IPC_MESSAGE_ROUTED2(ViewMsg_SetContentSettingsForLoadingURL, 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. IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL, GURL /* url */, ContentSettings /* content_settings */) // Change encoding of page in the renderer. IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding, std::string /*new encoding name*/) // Reset encoding of page in the renderer back to default. IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault) // Requests the renderer to reserve a range of page ids. IPC_MESSAGE_ROUTED1(ViewMsg_ReservePageIDRange, int /* size_of_range */) // D&d drop target messages. IPC_MESSAGE_ROUTED4(ViewMsg_DragTargetDragEnter, WebDropData /* drop_data */, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, WebKit::WebDragOperationsMask /* ops_allowed */) IPC_MESSAGE_ROUTED3(ViewMsg_DragTargetDragOver, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, WebKit::WebDragOperationsMask /* ops_allowed */) IPC_MESSAGE_ROUTED0(ViewMsg_DragTargetDragLeave) IPC_MESSAGE_ROUTED2(ViewMsg_DragTargetDrop, 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. IPC_MESSAGE_ROUTED4(ViewMsg_DragSourceEndedOrMoved, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, bool /* ended */, WebKit::WebDragOperation /* drag_operation */) // Notifies the renderer that the system DoDragDrop call has ended. IPC_MESSAGE_ROUTED0(ViewMsg_DragSourceSystemDragEnded) // Used to tell a render view whether it should expose various bindings // that allow JS content extended privileges. See BindingsPolicy for valid // flag values. IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings, int /* enabled_bindings_flags */) // Tell the renderer to add a property to the WebUI binding object. This // only works if we allowed WebUI bindings. IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty, 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. IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive, bool /* is_active */) // This message sends a string being composed with an input method. IPC_MESSAGE_ROUTED4( ViewMsg_ImeSetComposition, string16, /* text */ std::vector, /* underlines */ int, /* selectiont_start */ int /* selection_end */) // This message confirms an ongoing composition. IPC_MESSAGE_ROUTED1(ViewMsg_ImeConfirmComposition, string16 /* text */) // Used to notify the render-view that we have received a target URL. Used // to prevent target URLs spamming the browser. IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK) // Sets the alternate error page URL (link doctor) for the renderer process. IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL, GURL) // Install the first missing pluign. IPC_MESSAGE_ROUTED0(ViewMsg_InstallMissingPlugin) // Tells the renderer to empty its plugin list cache, optional reloading // pages containing plugins. IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache, bool /* reload_pages */) // Tells the render view to load all blocked plugins. IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins) // Tells the render view a prerendered page is about to be displayed. IPC_MESSAGE_ROUTED0(ViewMsg_DisplayPrerenderedPage) IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse, std::vector /* selected files */) // Used to instruct the RenderView to go into "view source" mode. IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) // Get all savable resource links from current webpage, include main // frame and sub-frame. IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, 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. IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, std::vector /* urls that have local copy */, std::vector /* 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. IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavicon, 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. IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) // 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. IPC_MESSAGE_ROUTED0(ViewMsg_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. IPC_MESSAGE_ROUTED1(ViewMsg_ClosePage, ViewMsg_ClosePage_Params) // Asks the renderer to send back stats on the WebCore cache broken down by // resource types. IPC_MESSAGE_CONTROL0(ViewMsg_GetCacheResourceStats) // Asks the renderer to send back Histograms. IPC_MESSAGE_CONTROL1(ViewMsg_GetRendererHistograms, int /* sequence number of Renderer Histograms. */) #if defined(USE_TCMALLOC) // Asks the renderer to send back tcmalloc stats. IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc) #endif // Asks the renderer to send back V8 heap stats. IPC_MESSAGE_CONTROL0(ViewMsg_GetV8HeapStats) // Notifies the renderer about ui theme changes IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) // Notifies the renderer that a paint is to be generated for the rectangle // passed in. IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, gfx::Size /* The view size to be repainted */) // Posts a message to the renderer. IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost, 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). IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) // 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. IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose, bool /* script_can_close */) // Notification that a move or resize renderer's containing window has // started. IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted) // The browser sends this message in response to all extension api calls. IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionResponse, 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. // If |extension_id| is non-empty, the function will be invoked only in // contexts owned by the extension. |args| is a list of primitive Value types // that are passed to the function. IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionMessageInvoke, std::string /* extension_id */, std::string /* function_name */, ListValue /* args */, GURL /* event URL */) // Tell the renderer process all known extension function names. IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetFunctionNames, std::vector) // TODO(aa): SetAPIPermissions, SetHostPermissions, and possibly // UpdatePageActions should be replaced with just sending additional data in // ExtensionLoaded. See: crbug.com/70516. // Tell the renderer process which permissions the given extension has. See // Extension::Permissions for which elements correspond to which permissions. IPC_MESSAGE_CONTROL2(ViewMsg_Extension_SetAPIPermissions, std::string /* extension_id */, std::set /* permissions */) // Tell the renderer process which host permissions the given extension has. IPC_MESSAGE_CONTROL2( ViewMsg_Extension_SetHostPermissions, GURL /* source extension's origin */, std::vector /* URLPatterns the extension can access */) // Tell the renderer process all known page action ids for a particular // extension. IPC_MESSAGE_CONTROL2(ViewMsg_Extension_UpdatePageActions, std::string /* extension_id */, std::vector /* page_action_ids */) // Notifies the renderer that an extension was loaded in the browser. IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionLoaded, ViewMsg_ExtensionLoaded_Params) // Notifies the renderer that an extension was unloaded in the browser. IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionUnloaded, std::string) // Updates the scripting whitelist for extensions in the render process. This is // only used for testing. IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetScriptingWhitelist, Extension::ScriptingWhitelist /* extenison ids */) // Changes the text direction of the currently selected input field (if any). IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection, WebKit::WebTextDirection /* direction */) // Tells the renderer to clear the focused node (if any). IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode) // 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. IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground, 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. IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK) // Used to instruct the RenderView to send back updates to the preferred size. IPC_MESSAGE_ROUTED1(ViewMsg_EnablePreferredSizeChangedMode, int /*flags*/) IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange, string16 /* value */, bool /* verbatim */, int /* selection_start */, int /* selection_end */) IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit, string16 /* value */, bool /* verbatim */) IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel) IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize, gfx::Rect /* search_box_bounds */) IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant, string16 /* value*/, bool /* verbatim */, int /* selection_start */, int /* selection_end */) // Used to tell the renderer not to add scrollbars with height and // width below a threshold. IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows, gfx::Size /* disable_scrollbar_size_limit */) // Activate/deactivate the RenderView (i.e., set its controls' tint // accordingly, etc.). IPC_MESSAGE_ROUTED1(ViewMsg_SetActive, bool /* active */) #if defined(OS_MACOSX) // Let the RenderView know its window has changed visibility. IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility, bool /* visibile */) // Let the RenderView know its window's frame has changed. IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged, gfx::Rect /* window frame */, gfx::Rect /* content view frame */) // Tell the renderer that plugin IME has completed. IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, string16 /* text */, int /* plugin_id */) #endif // Response message to ViewHostMsg_CreateShared/DedicatedWorker. // Sent when the worker has started. IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated) // Tell the renderer which browser window it's being attached to. IPC_MESSAGE_ROUTED1(ViewMsg_UpdateBrowserWindowId, int /* id of browser window */) // Tell the renderer which type this view is. IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType, ViewType::Type /* view_type */) // Notification that renderer should run some JavaScript code. IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode, ViewMsg_ExecuteCode_Params) // SpellChecker messages. IPC_MESSAGE_ROUTED0(ViewMsg_ToggleSpellCheck) IPC_MESSAGE_ROUTED1(ViewMsg_ToggleSpellPanel, bool) IPC_MESSAGE_ROUTED3(ViewMsg_SpellChecker_RespondTextCheck, int /* request identifier given by WebKit */, int /* document tag */, std::vector) // 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. IPC_MESSAGE_ROUTED0(ViewMsg_AdvanceToNextMisspelling) // 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_MESSAGE_CONTROL4(ViewMsg_SpellChecker_Init, IPC::PlatformFileForTransit /* bdict_file */, std::vector /* 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. IPC_MESSAGE_CONTROL1(ViewMsg_SpellChecker_WordAdded, std::string /* word */) // Toggle the auto spell correct functionality. IPC_MESSAGE_CONTROL1(ViewMsg_SpellChecker_EnableAutoSpellCorrect, bool /* enable */) // Tells the renderer to translate the page contents from one language to // another. IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage, 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. IPC_MESSAGE_ROUTED1(ViewMsg_RevertTranslation, int /* page id */) // Sent on process startup to indicate whether this process is running in // incognito mode. IPC_MESSAGE_CONTROL1(ViewMsg_SetIsIncognitoProcess, bool /* is_incognito_processs */) // Enable accessibility in the renderer process. IPC_MESSAGE_ROUTED0(ViewMsg_EnableAccessibility) // Relay a request from assistive technology to set focus to a given node. IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityFocus, int /* object id */) // Relay a request from assistive technology to perform the default action // on a given node. IPC_MESSAGE_ROUTED1(ViewMsg_AccessibilityDoDefaultAction, int /* object id */) // Tells the render view that a ViewHostMsg_AccessibilityNotifications // message was processed and it can send addition notifications. IPC_MESSAGE_ROUTED0(ViewMsg_AccessibilityNotifications_ACK) // The response to ViewHostMsg_AsyncOpenFile. IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK, base::PlatformFileError /* error_code */, IPC::PlatformFileForTransit /* file descriptor */, int /* message_id */) // A classification model for client-side phishing detection. // The given file contains an encoded safe_browsing::ClientSideModel // protocol buffer. IPC_MESSAGE_CONTROL1(ViewMsg_SetPhishingModel, IPC::PlatformFileForTransit /* model_file */) // Request a DOM tree when a malware interstitial is shown. IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails) // Tells the renderer to begin phishing detection for the given toplevel URL // which it has started loading. IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL) // Tells the renderer that the network state has changed and that // window.navigator.onLine should be updated for all WebViews. IPC_MESSAGE_ROUTED1(ViewMsg_NetworkStateChanged, bool /* online */) //----------------------------------------------------------------------------- // 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. IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow, ViewHostMsg_CreateWindow_Params, int /* route_id */, int64 /* cloned_session_storage_namespace_id */) // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like // tag), and returns the signed public // key and challenge string. IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen, 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. IPC_MESSAGE_CONTROL0(ViewHostMsg_SpellChecker_RequestDictionary) IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_SpellChecker_PlatformCheckSpelling, string16 /* word */, int /* document tag */, bool /* correct */) IPC_SYNC_MESSAGE_CONTROL1_1( ViewHostMsg_SpellChecker_PlatformFillSuggestionList, string16 /* word */, std::vector /* suggestions */) IPC_MESSAGE_CONTROL4(ViewHostMsg_SpellChecker_PlatformRequestTextCheck, int /* route_id for response */, int /* request identifier given by WebKit */, int /* document tag */, string16 /* sentence */) // Updates the minimum/maximum allowed zoom percent for this tab from the // default values. If |remember| is true, then the zoom setting is applied to // other pages in the site and is saved, otherwise it only applies to this // tab. IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits, int /* minimum_percent */, int /* maximum_percent */, bool /* remember */) // Suggest results ----------------------------------------------------------- IPC_MESSAGE_ROUTED3(ViewHostMsg_SetSuggestions, int32 /* page_id */, std::vector /* suggestions */, InstantCompleteBehavior) IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined, int32 /* page_id */, bool /* result */) // Updates the content restrictions, i.e. to disable print/copy. IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions, int /* restrictions */) // The currently displayed PDF has an unsupported feature. IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature) // JavaScript related messages ----------------------------------------------- // Notify the JavaScript engine in the render to change its parameters // while performing stress testing. IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, int /* cmd */, int /* param */) // Register a new handler for URL requests with the given scheme. IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, std::string /* scheme */, GURL /* url */, string16 /* title */) // Send from the renderer to the browser to return the script running result. IPC_MESSAGE_ROUTED2(ViewHostMsg_ExecuteCodeFinished, int, /* request id */ bool /* whether the script ran successfully */)