diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 01:00:55 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 01:00:55 +0000 |
commit | 59f4f2fa7a3a6509bb524ac93e4a821efe268d35 (patch) | |
tree | 5196fb43051b8983a1219a2cbdf4d1bb42d92629 /chrome | |
parent | 0ad9befd15a41b07123b4632ce6d37f02e31c9f2 (diff) | |
download | chromium_src-59f4f2fa7a3a6509bb524ac93e4a821efe268d35.zip chromium_src-59f4f2fa7a3a6509bb524ac93e4a821efe268d35.tar.gz chromium_src-59f4f2fa7a3a6509bb524ac93e4a821efe268d35.tar.bz2 |
Move the rest of the content browser->renderer messages to content. Also move drag related messages to their own file.
TBR=tsepez
Review URL: http://codereview.chromium.org/6705012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/extension_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/notifications/balloon_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_mac.mm | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 1 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 1 | ||||
-rw-r--r-- | chrome/common/common_param_traits.cc | 83 | ||||
-rw-r--r-- | chrome/common/common_param_traits.h | 13 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unpacker.cc | 2 | ||||
-rw-r--r-- | chrome/common/render_messages.cc | 32 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 256 | ||||
-rw-r--r-- | chrome/common/render_messages_params.cc | 104 | ||||
-rw-r--r-- | chrome/common/render_messages_params.h | 87 | ||||
-rw-r--r-- | chrome/common/webkit_param_traits.cc | 32 | ||||
-rw-r--r-- | chrome/common/webkit_param_traits.h | 15 | ||||
-rw-r--r-- | chrome/tools/ipclist/all_messages.h | 1 |
17 files changed, 8 insertions, 627 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index be193db..7af01a2 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -32,7 +32,6 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/render_messages.h" -#include "chrome/common/render_messages_params.h" #include "chrome/common/url_constants.h" #include "chrome/common/view_types.h" #include "content/browser/browsing_instance.h" @@ -46,6 +45,7 @@ #include "content/browser/webui/web_ui_factory.h" #include "content/common/native_web_keyboard_event.h" #include "content/common/notification_service.h" +#include "content/common/view_messages.h" #include "grit/browser_resources.h" #include "grit/generated_resources.h" #include "ui/base/keycodes/keyboard_codes.h" diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 7b2adea..c608150 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -14,7 +14,6 @@ #include "chrome/browser/renderer_preferences_util.h" #include "chrome/common/bindings_policy.h" #include "chrome/common/render_messages.h" -#include "chrome/common/render_messages_params.h" #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/site_instance.h" @@ -22,6 +21,7 @@ #include "content/common/notification_source.h" #include "content/common/notification_type.h" #include "content/common/renderer_preferences.h" +#include "content/common/view_messages.h" #include "webkit/glue/webpreferences.h" BalloonHost::BalloonHost(Balloon* balloon) diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 0c93f3b..1ec08bd 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -34,6 +34,7 @@ #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/browser/renderer_host/render_widget_host.h" #include "content/common/native_web_keyboard_event.h" +#include "content/common/view_messages.h" #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/x/x11_util.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index fe4e952..a63de41 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -36,6 +36,7 @@ #include "content/common/gpu_messages.h" #include "content/common/native_web_keyboard_event.h" #include "content/common/plugin_messages.h" +#include "content/common/view_messages.h" #include "skia/ext/platform_canvas.h" #import "third_party/mozilla/ComplexTextInputPanel.h" #include "third_party/skia/include/core/SkColor.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 4620a49..972a04c 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -30,6 +30,7 @@ #include "content/common/native_web_keyboard_event.h" #include "content/common/notification_service.h" #include "content/common/plugin_messages.h" +#include "content/common/view_messages.h" #include "grit/webkit_resources.h" #include "skia/ext/skia_utils_win.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index 9c9d09c..cc26c77 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -12,7 +12,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" -#include "chrome/common/render_messages_params.h" #include "chrome/common/url_constants.h" #include "chrome/test/testing_pref_service.h" #include "chrome/test/testing_profile.h" @@ -26,6 +25,7 @@ #include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/test_tab_contents.h" +#include "content/common/view_messages.h" #include "ipc/ipc_channel.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/message_box_flags.h" diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index b173da2..84b38e3 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -456,7 +456,6 @@ '../skia/config/win', ], 'defines': [ - 'EXCLUDE_SKIA_DEPENDENCIES', '<@(nacl_win64_defines)', ], 'sources': [ diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc index d9a07fc..a20d987 100644 --- a/chrome/common/common_param_traits.cc +++ b/chrome/common/common_param_traits.cc @@ -14,93 +14,10 @@ #include "printing/backend/print_backend.h" #include "printing/native_metafile.h" #include "printing/page_range.h" - -#ifndef EXCLUDE_SKIA_DEPENDENCIES -#include "third_party/skia/include/core/SkBitmap.h" -#endif #include "webkit/glue/password_form.h" namespace IPC { -#ifndef EXCLUDE_SKIA_DEPENDENCIES - -namespace { - -struct SkBitmap_Data { - // The configuration for the bitmap (bits per pixel, etc). - SkBitmap::Config fConfig; - - // The width of the bitmap in pixels. - uint32 fWidth; - - // The height of the bitmap in pixels. - uint32 fHeight; - - void InitSkBitmapDataForTransfer(const SkBitmap& bitmap) { - fConfig = bitmap.config(); - fWidth = bitmap.width(); - fHeight = bitmap.height(); - } - - // Returns whether |bitmap| successfully initialized. - bool InitSkBitmapFromData(SkBitmap* bitmap, const char* pixels, - size_t total_pixels) const { - if (total_pixels) { - bitmap->setConfig(fConfig, fWidth, fHeight, 0); - if (!bitmap->allocPixels()) - return false; - if (total_pixels != bitmap->getSize()) - return false; - memcpy(bitmap->getPixels(), pixels, total_pixels); - } - return true; - } -}; - -} // namespace - - -void ParamTraits<SkBitmap>::Write(Message* m, const SkBitmap& p) { - size_t fixed_size = sizeof(SkBitmap_Data); - SkBitmap_Data bmp_data; - bmp_data.InitSkBitmapDataForTransfer(p); - m->WriteData(reinterpret_cast<const char*>(&bmp_data), - static_cast<int>(fixed_size)); - size_t pixel_size = p.getSize(); - SkAutoLockPixels p_lock(p); - m->WriteData(reinterpret_cast<const char*>(p.getPixels()), - static_cast<int>(pixel_size)); -} - -bool ParamTraits<SkBitmap>::Read(const Message* m, void** iter, SkBitmap* r) { - const char* fixed_data; - int fixed_data_size = 0; - if (!m->ReadData(iter, &fixed_data, &fixed_data_size) || - (fixed_data_size <= 0)) { - NOTREACHED(); - return false; - } - if (fixed_data_size != sizeof(SkBitmap_Data)) - return false; // Message is malformed. - - const char* variable_data; - int variable_data_size = 0; - if (!m->ReadData(iter, &variable_data, &variable_data_size) || - (variable_data_size < 0)) { - NOTREACHED(); - return false; - } - const SkBitmap_Data* bmp_data = - reinterpret_cast<const SkBitmap_Data*>(fixed_data); - return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size); -} - -void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) { - l->append("<SkBitmap>"); -} - -#endif // EXCLUDE_SKIA_DEPENDENCIES - void ParamTraits<ContentSetting>::Write(Message* m, const param_type& p) { WriteParam(m, static_cast<int>(p)); } diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h index 1225ee1..73207ec 100644 --- a/chrome/common/common_param_traits.h +++ b/chrome/common/common_param_traits.h @@ -28,7 +28,6 @@ #include "webkit/glue/window_open_disposition.h" // Forward declarations. -class SkBitmap; class DictionaryValue; class ListValue; struct ThumbnailScore; @@ -46,18 +45,6 @@ struct PasswordForm; namespace IPC { template <> -struct ParamTraits<SkBitmap> { - typedef SkBitmap param_type; - static void Write(Message* m, const param_type& p); - - // Note: This function expects parameter |r| to be of type &SkBitmap since - // r->SetConfig() and r->SetPixels() are called. - static bool Read(const Message* m, void** iter, param_type* r); - - static void Log(const param_type& p, std::string* l); -}; - -template <> struct ParamTraits<ContentSetting> { typedef ContentSetting param_type; static void Write(Message* m, const param_type& p); diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc index fee4b54..d63b7cf 100644 --- a/chrome/common/extensions/extension_unpacker.cc +++ b/chrome/common/extensions/extension_unpacker.cc @@ -14,7 +14,6 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "net/base/file_stream.h" -#include "chrome/common/common_param_traits.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" @@ -22,6 +21,7 @@ #include "chrome/common/json_value_serializer.h" #include "chrome/common/url_constants.h" #include "chrome/common/zip.h" +#include "content/common/common_param_traits.h" #include "ipc/ipc_message_utils.h" #include "third_party/skia/include/core/SkBitmap.h" #include "webkit/glue/image_decoder.h" diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc index 3b7408e..bf77ae0 100644 --- a/chrome/common/render_messages.cc +++ b/chrome/common/render_messages.cc @@ -159,38 +159,6 @@ void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p, l->append(")"); } -void ParamTraits<WebDropData>::Write(Message* m, const param_type& p) { - WriteParam(m, p.url); - WriteParam(m, p.url_title); - WriteParam(m, p.download_metadata); - WriteParam(m, p.file_extension); - WriteParam(m, p.filenames); - WriteParam(m, p.plain_text); - WriteParam(m, p.text_html); - WriteParam(m, p.html_base_url); - WriteParam(m, p.file_description_filename); - WriteParam(m, p.file_contents); -} - -bool ParamTraits<WebDropData>::Read(const Message* m, void** iter, - param_type* p) { - return - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->url_title) && - ReadParam(m, iter, &p->download_metadata) && - ReadParam(m, iter, &p->file_extension) && - ReadParam(m, iter, &p->filenames) && - ReadParam(m, iter, &p->plain_text) && - ReadParam(m, iter, &p->text_html) && - ReadParam(m, iter, &p->html_base_url) && - ReadParam(m, iter, &p->file_description_filename) && - ReadParam(m, iter, &p->file_contents); -} - -void ParamTraits<WebDropData>::Log(const param_type& p, std::string* l) { - l->append("<WebDropData>"); -} - void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) { WriteParam(m, p.valid_schemes()); WriteParam(m, p.GetAsString()); diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index c8d4c2d..d552ad4 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -53,7 +53,6 @@ #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" @@ -136,15 +135,6 @@ struct ParamTraits<webkit::npapi::WebPluginInfo> { static void Log(const param_type& p, std::string* l); }; -// Traits for WebDropData -template <> -struct ParamTraits<WebDropData> { - 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 @@ -322,88 +312,6 @@ 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<WebKit::WebCompositionUnderline>, /* 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) @@ -418,9 +326,6 @@ 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<FilePath> /* selected files */) - // Used to instruct the RenderView to go into "view source" mode. IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) @@ -449,24 +354,6 @@ IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavicon, 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) @@ -483,14 +370,6 @@ IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc) // 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 */, @@ -509,10 +388,6 @@ IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) 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 */, @@ -570,28 +445,6 @@ IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionUnloaded, std::string) 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 */, @@ -609,36 +462,6 @@ IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant, 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 */) @@ -719,12 +542,6 @@ IPC_MESSAGE_ROUTED1(ViewMsg_AccessibilityDoDefaultAction, // 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. @@ -738,11 +555,6 @@ IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails) // 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. @@ -1231,21 +1043,6 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged, IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser, ViewHostMsg_RunFileChooser_Params) -// 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. -IPC_MESSAGE_ROUTED4(ViewHostMsg_StartDragging, - 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. -IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateDragCursor, - 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 */) @@ -1415,18 +1212,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_DidGetApplicationInfo, IPC_MESSAGE_ROUTED1(ViewHostMsg_InstallApplication, WebApplicationInfo) -// 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. -IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK, - bool /* proceed */) - -// Indicates that the current page has been closed, after a ClosePage -// message. The parameters are just echoed from the ClosePage request. -IPC_MESSAGE_ROUTED1(ViewHostMsg_ClosePage_ACK, - ViewMsg_ClosePage_Params) - IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavicon, int /* Identifier of the request */, GURL /* URL of the image */, @@ -1609,47 +1394,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_AcceleratedSurfaceBuffersSwapped, uint64 /* surface_id */) #endif -// 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. -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker, - ViewHostMsg_CreateWorker_Params, - 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. -IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker, - ViewHostMsg_CreateWorker_Params, - 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). -IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached, - uint64 /* document_id */) - -// 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. -IPC_MESSAGE_CONTROL1(ViewHostMsg_CancelCreateDedicatedWorker, - int /* route_id */) - -// Wraps an IPC message that's destined to the worker on the renderer->browser -// hop. -IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker, - 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 diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc index 84c00c9..4a60180 100644 --- a/chrome/common/render_messages_params.cc +++ b/chrome/common/render_messages_params.cc @@ -35,17 +35,6 @@ ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params() ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() { } -ViewMsg_ClosePage_Params::ViewMsg_ClosePage_Params() - : closing_process_id(0), - closing_route_id(0), - for_cross_site_transition(false), - new_render_process_host_id(0), - new_request_id(0) { -} - -ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() { -} - ViewMsg_Print_Params::ViewMsg_Print_Params() : margin_top(0), margin_left(0), @@ -158,18 +147,6 @@ ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params( ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() { } -ViewHostMsg_CreateWorker_Params::ViewHostMsg_CreateWorker_Params() - : is_shared(false), - document_id(0), - render_view_route_id(0), - route_id(0), - parent_appcache_host_id(0), - script_resource_appcache_id(0) { -} - -ViewHostMsg_CreateWorker_Params::~ViewHostMsg_CreateWorker_Params() { -} - ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params() : opener_id(0), user_gesture(false), @@ -588,40 +565,6 @@ void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p, l->append(")"); } -void ParamTraits<ViewMsg_ClosePage_Params>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.closing_process_id); - WriteParam(m, p.closing_route_id); - WriteParam(m, p.for_cross_site_transition); - WriteParam(m, p.new_render_process_host_id); - WriteParam(m, p.new_request_id); -} - -bool ParamTraits<ViewMsg_ClosePage_Params>::Read(const Message* m, - void** iter, - param_type* r) { - return ReadParam(m, iter, &r->closing_process_id) && - ReadParam(m, iter, &r->closing_route_id) && - ReadParam(m, iter, &r->for_cross_site_transition) && - ReadParam(m, iter, &r->new_render_process_host_id) && - ReadParam(m, iter, &r->new_request_id); -} - -void ParamTraits<ViewMsg_ClosePage_Params>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.closing_process_id, l); - l->append(", "); - LogParam(p.closing_route_id, l); - l->append(", "); - LogParam(p.for_cross_site_transition, l); - l->append(", "); - LogParam(p.new_render_process_host_id, l); - l->append(", "); - LogParam(p.new_request_id, l); - l->append(")"); -} - void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { WriteParam(m, p.page_size); WriteParam(m, p.printable_size); @@ -809,53 +752,6 @@ void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p, l->append("<ViewMsg_ExecuteCode_Params>"); } -void ParamTraits<ViewHostMsg_CreateWorker_Params>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.url); - WriteParam(m, p.is_shared); - WriteParam(m, p.name); - WriteParam(m, p.document_id); - WriteParam(m, p.render_view_route_id); - WriteParam(m, p.route_id); - WriteParam(m, p.parent_appcache_host_id); - WriteParam(m, p.script_resource_appcache_id); -} - -bool ParamTraits<ViewHostMsg_CreateWorker_Params>::Read(const Message* m, - void** iter, - param_type* p) { - return - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->is_shared) && - ReadParam(m, iter, &p->name) && - ReadParam(m, iter, &p->document_id) && - ReadParam(m, iter, &p->render_view_route_id) && - ReadParam(m, iter, &p->route_id) && - ReadParam(m, iter, &p->parent_appcache_host_id) && - ReadParam(m, iter, &p->script_resource_appcache_id); -} - -void ParamTraits<ViewHostMsg_CreateWorker_Params>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.url, l); - l->append(", "); - LogParam(p.is_shared, l); - l->append(", "); - LogParam(p.name, l); - l->append(", "); - LogParam(p.document_id, l); - l->append(", "); - LogParam(p.render_view_route_id, l); - l->append(","); - LogParam(p.route_id, l); - l->append(", "); - LogParam(p.parent_appcache_host_id, l); - l->append(","); - LogParam(p.script_resource_appcache_id, l); - l->append(")"); -} - void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m, const param_type& p) { WriteParam(m, p.opener_id); diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h index 149d59e..4ce3b86 100644 --- a/chrome/common/render_messages_params.h +++ b/chrome/common/render_messages_params.h @@ -276,45 +276,6 @@ struct ViewHostMsg_UpdateRect_Params { int flags; }; -// Information on closing a tab. This is used both for ViewMsg_ClosePage, and -// the corresponding ViewHostMsg_ClosePage_ACK. -struct ViewMsg_ClosePage_Params { - ViewMsg_ClosePage_Params(); - ~ViewMsg_ClosePage_Params(); - - // The identifier of the RenderProcessHost for the currently closing view. - // - // These first two parameters are technically redundant since they are - // needed only when processing the ACK message, and the processor - // theoretically knows both the process and route ID. However, this is - // difficult to figure out with our current implementation, so this - // information is duplicate here. - int closing_process_id; - - // The route identifier for the currently closing RenderView. - int closing_route_id; - - // True when this close is for the first (closing) tab of a cross-site - // transition where we switch processes. False indicates the close is for the - // entire tab. - // - // When true, the new_* variables below must be filled in. Otherwise they must - // both be -1. - bool for_cross_site_transition; - - // The identifier of the RenderProcessHost for the new view attempting to - // replace the closing one above. This must be valid when - // for_cross_site_transition is set, and must be -1 otherwise. - int new_render_process_host_id; - - // The identifier of the *request* the new view made that is causing the - // cross-site transition. This is *not* a route_id, but the request that we - // will resume once the ACK from the closing view has been received. This - // must be valid when for_cross_site_transition is set, and must be -1 - // otherwise. - int new_request_id; -}; - // Parameters for a render request. struct ViewMsg_Print_Params { ViewMsg_Print_Params(); @@ -473,38 +434,6 @@ struct ViewMsg_ExecuteCode_Params { bool all_frames; }; -// Parameters for the message that creates a worker thread. -struct ViewHostMsg_CreateWorker_Params { - ViewHostMsg_CreateWorker_Params(); - ~ViewHostMsg_CreateWorker_Params(); - - // URL for the worker script. - GURL url; - - // True if this is a SharedWorker, false if it is a dedicated Worker. - bool is_shared; - - // Name for a SharedWorker, otherwise empty string. - string16 name; - - // The ID of the parent document (unique within parent renderer). - unsigned long long document_id; - - // RenderView routing id used to send messages back to the parent. - int render_view_route_id; - - // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed, - // a new unique ID is created and assigned to the worker. - int route_id; - - // The ID of the parent's appcache host, only valid for dedicated workers. - int parent_appcache_host_id; - - // The ID of the appcache the main shared worker script resource was loaded - // from, only valid for shared workers. - int64 script_resource_appcache_id; -}; - struct ViewHostMsg_CreateWindow_Params { ViewHostMsg_CreateWindow_Params(); ~ViewHostMsg_CreateWindow_Params(); @@ -718,14 +647,6 @@ struct ParamTraits<ViewHostMsg_UpdateRect_Params> { }; template <> -struct ParamTraits<ViewMsg_ClosePage_Params> { - typedef ViewMsg_ClosePage_Params 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<ViewMsg_Print_Params> { typedef ViewMsg_Print_Params param_type; static void Write(Message* m, const param_type& p); @@ -781,14 +702,6 @@ struct ParamTraits<ViewMsg_ExecuteCode_Params> { static void Log(const param_type& p, std::string* l); }; -template <> -struct ParamTraits<ViewHostMsg_CreateWorker_Params> { - typedef ViewHostMsg_CreateWorker_Params 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<ViewHostMsg_CreateWindow_Params> { typedef ViewHostMsg_CreateWindow_Params param_type; diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc index 5a48c12..5c9bd48 100644 --- a/chrome/common/webkit_param_traits.cc +++ b/chrome/common/webkit_param_traits.cc @@ -5,7 +5,6 @@ #include "chrome/common/webkit_param_traits.h" #include "base/format_macros.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" namespace IPC { @@ -78,37 +77,6 @@ void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log( p.count, p.size, p.liveSize, p.decodedSize)); } -void ParamTraits<WebKit::WebCompositionUnderline>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.startOffset); - WriteParam(m, p.endOffset); - WriteParam(m, p.color); - WriteParam(m, p.thick); -} - -bool ParamTraits<WebKit::WebCompositionUnderline>::Read( - const Message* m, void** iter, - param_type* p) { - return - ReadParam(m, iter, &p->startOffset) && - ReadParam(m, iter, &p->endOffset) && - ReadParam(m, iter, &p->color) && - ReadParam(m, iter, &p->thick); -} - -void ParamTraits<WebKit::WebCompositionUnderline>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.startOffset, l); - l->append(","); - LogParam(p.endOffset, l); - l->append(":"); - LogParam(p.color, l); - l->append(":"); - LogParam(p.thick, l); - l->append(")"); -} - void ParamTraits<WebKit::WebTextCheckingResult>::Write(Message* m, const param_type& p) { #if defined(WEB_TEXT_CHECKING_RESULT_IS_A_STRUCT) diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h index 2a9609d..9e7aa48 100644 --- a/chrome/common/webkit_param_traits.h +++ b/chrome/common/webkit_param_traits.h @@ -28,14 +28,12 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" namespace WebKit { -struct WebCompositionUnderline; struct WebRect; struct WebScreenInfo; } @@ -142,19 +140,6 @@ struct ParamTraits<WebKit::WebCache::ResourceTypeStats> { }; template <> -struct SimilarTypeTraits<WebKit::WebDragOperation> { - typedef int Type; -}; - -template <> -struct ParamTraits<WebKit::WebCompositionUnderline> { - typedef WebKit::WebCompositionUnderline 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<WebKit::WebTextInputType> { typedef WebKit::WebTextInputType param_type; static void Write(Message* m, const param_type& p) { diff --git a/chrome/tools/ipclist/all_messages.h b/chrome/tools/ipclist/all_messages.h index af80dd9..72fdab7 100644 --- a/chrome/tools/ipclist/all_messages.h +++ b/chrome/tools/ipclist/all_messages.h @@ -22,6 +22,7 @@ #include "content/common/desktop_notification_messages.h" #include "content/common/device_orientation_messages.h" #include "content/common/dom_storage_messages.h" +#include "content/common/drag_messages.h" #include "content/common/file_system_messages.h" #include "content/common/file_utilities_messages.h" #include "content/common/geolocation_messages.h" |