| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This header is meant to be included in multiple passes, hence no traditional | 5 // This header is meant to be included in multiple passes, hence no traditional |
| 6 // header guard. | 6 // header guard. |
| 7 // See ipc_message_macros.h for explanation of the macros and passes. | 7 // See ipc_message_macros.h for explanation of the macros and passes. |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 | 13 |
| 14 #include "base/clipboard.h" | 14 #include "base/clipboard.h" |
| 15 #include "base/gfx/rect.h" | 15 #include "base/gfx/rect.h" |
| 16 #include "base/gfx/native_widget_types.h" | 16 #include "base/gfx/native_widget_types.h" |
| 17 #include "base/shared_memory.h" | 17 #include "base/shared_memory.h" |
| 18 #include "chrome/common/ipc_message_macros.h" | 18 #include "chrome/common/ipc_message_macros.h" |
| 19 #include "skia/include/SkBitmap.h" | 19 #include "skia/include/SkBitmap.h" |
| 20 #include "webkit/glue/console_message_level.h" | 20 #include "webkit/glue/console_message_level.h" |
| 21 #include "webkit/glue/context_node_types.h" | 21 #include "webkit/glue/context_node_types.h" |
| 22 #include "webkit/glue/dom_operations.h" | 22 #include "webkit/glue/dom_operations.h" |
| 23 #include "webkit/glue/screen_info.h" | 23 #include "webkit/glue/screen_info.h" |
| 24 #include "webkit/glue/webcursor.h" | 24 #include "webkit/glue/webcursor.h" |
| 25 #include "webkit/glue/webinputevent.h" | 25 #include "webkit/glue/webinputevent.h" |
| 26 #include "webkit/glue/webplugin.h" | 26 #include "webkit/glue/webplugin.h" |
| 27 | 27 |
| 28 void RenderMessagesInit(); |
| 29 |
| 28 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes | 30 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes |
| 29 // more sense with our current design. | 31 // more sense with our current design. |
| 30 | 32 |
| 31 //----------------------------------------------------------------------------- | 33 //----------------------------------------------------------------------------- |
| 32 // RenderView messages | 34 // RenderView messages |
| 33 // These are messages sent from the browser to the renderer process. | 35 // These are messages sent from the browser to the renderer process. |
| 34 | 36 |
| 35 IPC_BEGIN_MESSAGES(View) | 37 IPC_BEGIN_MESSAGES(View, 1) |
| 36 // Used typically when recovering from a crash. The new rendering process | 38 // Used typically when recovering from a crash. The new rendering process |
| 37 // sets its global "next page id" counter to the given value. | 39 // sets its global "next page id" counter to the given value. |
| 38 IPC_MESSAGE_CONTROL1(ViewMsg_SetNextPageID, | 40 IPC_MESSAGE_CONTROL1(ViewMsg_SetNextPageID, |
| 39 int32 /* next_page_id */) | 41 int32 /* next_page_id */) |
| 40 | 42 |
| 41 // Tells the renderer to create a new view. | 43 // Tells the renderer to create a new view. |
| 42 // This message is slightly different, the view it takes is the view to | 44 // This message is slightly different, the view it takes is the view to |
| 43 // create, the message itself is sent as a non-view control message. | 45 // create, the message itself is sent as a non-view control message. |
| 44 IPC_MESSAGE_CONTROL4(ViewMsg_New, | 46 IPC_MESSAGE_CONTROL4(ViewMsg_New, |
| 45 gfx::NativeViewId, /* parent window */ | 47 gfx::NativeViewId, /* parent window */ |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 IPC_MESSAGE_ROUTED1(ViewMsg_PopupNotificationVisiblityChanged, | 479 IPC_MESSAGE_ROUTED1(ViewMsg_PopupNotificationVisiblityChanged, |
| 478 bool /* Whether it is visible */) | 480 bool /* Whether it is visible */) |
| 479 | 481 |
| 480 IPC_END_MESSAGES(View) | 482 IPC_END_MESSAGES(View) |
| 481 | 483 |
| 482 | 484 |
| 483 //----------------------------------------------------------------------------- | 485 //----------------------------------------------------------------------------- |
| 484 // WebContents messages | 486 // WebContents messages |
| 485 // These are messages sent from the renderer to the browser process. | 487 // These are messages sent from the renderer to the browser process. |
| 486 | 488 |
| 487 IPC_BEGIN_MESSAGES(ViewHost) | 489 IPC_BEGIN_MESSAGES(ViewHost, 2) |
| 488 // Sent by the renderer when it is creating a new window. The browser creates | 490 // Sent by the renderer when it is creating a new window. The browser creates |
| 489 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is | 491 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is |
| 490 // MSG_ROUTING_NONE, the view couldn't be created. modal_dialog_event is set | 492 // MSG_ROUTING_NONE, the view couldn't be created. modal_dialog_event is set |
| 491 // by the browser when a modal dialog is shown. | 493 // by the browser when a modal dialog is shown. |
| 492 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWindow, | 494 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWindow, |
| 493 int /* opener_id */, | 495 int /* opener_id */, |
| 494 bool /* user_gesture */, | 496 bool /* user_gesture */, |
| 495 int /* route_id */, | 497 int /* route_id */, |
| 496 ModalDialogEvent /* modal_dialog_event */) | 498 ModalDialogEvent /* modal_dialog_event */) |
| 497 | 499 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 std::wstring /* in - default prompt */, | 731 std::wstring /* in - default prompt */, |
| 730 int /* in - dialog flags */, | 732 int /* in - dialog flags */, |
| 731 bool /* out - success */, | 733 bool /* out - success */, |
| 732 std::wstring /* out - prompt field */) | 734 std::wstring /* out - prompt field */) |
| 733 | 735 |
| 734 // Sets the contents for the given page (URL and page ID are the first two | 736 // Sets the contents for the given page (URL and page ID are the first two |
| 735 // arguments) given the contents that is the 3rd. | 737 // arguments) given the contents that is the 3rd. |
| 736 IPC_MESSAGE_CONTROL3(ViewHostMsg_PageContents, GURL, int32, std::wstring) | 738 IPC_MESSAGE_CONTROL3(ViewHostMsg_PageContents, GURL, int32, std::wstring) |
| 737 | 739 |
| 738 // Specifies the URL as the first parameter (a wstring) and thumbnail as | 740 // Specifies the URL as the first parameter (a wstring) and thumbnail as |
| 739 // binary data as the second parameter. | 741 // binary data as the second parameter. Our macros don't handle binary data, |
| 740 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail, | 742 // so this is declared "empty," to be encoded by the caller/receiver. |
| 741 GURL /* url */, | 743 IPC_MESSAGE_EMPTY(ViewHostMsg_Thumbnail) |
| 742 ThumbnailScore /* score */, | |
| 743 SkBitmap /* bitmap */) | |
| 744 | 744 |
| 745 // Notification that the url for the favicon of a site has been determined. | 745 // Notification that the url for the favicon of a site has been determined. |
| 746 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFavIconURL, | 746 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFavIconURL, |
| 747 int32 /* page_id */, | 747 int32 /* page_id */, |
| 748 GURL /* url of the favicon */) | 748 GURL /* url of the favicon */) |
| 749 | 749 |
| 750 // Used to tell the parent that the user right clicked on an area of the | 750 // Used to tell the parent that the user right clicked on an area of the |
| 751 // content area, and a context menu should be shown for it. The params | 751 // content area, and a context menu should be shown for it. The params |
| 752 // object contains information about the node(s) that were selected when the | 752 // object contains information about the node(s) that were selected when the |
| 753 // user right clicked. | 753 // user right clicked. |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 | 1102 |
| 1103 // Get the list of proxies to use for |url|, as a semicolon delimited list | 1103 // Get the list of proxies to use for |url|, as a semicolon delimited list |
| 1104 // of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also | 1104 // of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also |
| 1105 // PluginProcessHostMsg_ResolveProxy which does the same thing. | 1105 // PluginProcessHostMsg_ResolveProxy which does the same thing. |
| 1106 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy, | 1106 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy, |
| 1107 GURL /* url */, | 1107 GURL /* url */, |
| 1108 int /* network error */, | 1108 int /* network error */, |
| 1109 std::string /* proxy list */) | 1109 std::string /* proxy list */) |
| 1110 | 1110 |
| 1111 IPC_END_MESSAGES(ViewHost) | 1111 IPC_END_MESSAGES(ViewHost) |
| OLD | NEW |