Index: chrome/common/render_messages_internal.h |
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h |
index 1081e54c83788f3a288f83631063e44f1967589d..30c6469514d68739744a4d1b7c754c5ec897a297 100644 |
--- a/chrome/common/render_messages_internal.h |
+++ b/chrome/common/render_messages_internal.h |
@@ -13,6 +13,7 @@ |
#include "base/clipboard.h" |
#include "base/gfx/rect.h" |
+#include "base/gfx/native_widget_types.h" |
#include "base/shared_memory.h" |
#include "chrome/common/ipc_message_macros.h" |
#include "skia/include/SkBitmap.h" |
@@ -39,12 +40,14 @@ IPC_BEGIN_MESSAGES(View, 1) |
IPC_MESSAGE_CONTROL1(ViewMsg_SetNextPageID, |
int32 /* next_page_id */) |
-#if defined(OS_WIN) |
// Tells the renderer to create a new view. |
// This message is slightly different, the view it takes is the view to |
// create, the message itself is sent as a non-view control message. |
- IPC_MESSAGE_CONTROL4(ViewMsg_New, HWND, HANDLE, WebPreferences, int32) |
-#endif // defined(OS_WIN) |
+ IPC_MESSAGE_CONTROL4(ViewMsg_New, |
+ gfx::NativeViewId, /* parent window */ |
+ ModalDialogEvent, /* model dialog box event */ |
+ WebPreferences, |
+ int32 /* view id */) |
// Tells the renderer to set its maximum cache size to the supplied value |
IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities, |
@@ -61,13 +64,8 @@ IPC_BEGIN_MESSAGES(View, 1) |
// 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 |
-#if defined(OS_WIN) |
IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, |
- HWND /* parent_hwnd */) |
-#else // defined(OS_WIN) |
- // On POSIX, we don't pass "window handles" between processes. |
- IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK) |
-#endif |
+ gfx::NativeViewId /* parent_hwnd */) |
// Tells the render view to close. |
IPC_MESSAGE_ROUTED0(ViewMsg_Close) |
@@ -495,7 +493,6 @@ IPC_END_MESSAGES(View) |
// These are messages sent from the renderer to the browser process. |
IPC_BEGIN_MESSAGES(ViewHost, 2) |
-#if defined(OS_WIN) |
// 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. modal_dialog_event is set |
@@ -504,16 +501,7 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
int /* opener_id */, |
bool /* user_gesture */, |
int /* route_id */, |
- HANDLE /* modal_dialog_event */) |
-#else // defined(OS_WIN) |
- // On POSIX, we don't use the cross process events for modal dialogs. At some |
- // point, we won't use them on any platform, but for now we just define a |
- // message without the last parameter. |
- IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWindow, |
- int /* opener_id */, |
- bool /* user_gesture */, |
- int /* route_id */) |
-#endif |
+ ModalDialogEvent /* modal_dialog_event */) |
// Similar to ViewHostMsg_CreateView, except used for sub-widgets, like |
// <select> dropdowns. This message is sent to the WebContents that |
@@ -523,13 +511,11 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
bool /* focus on show */, |
int /* route_id */) |
-#if defined(OS_WIN) |
// These two messages are sent as a result of the above two, in the browser |
// process, from RenderWidgetHelper to RenderViewHost. |
IPC_MESSAGE_ROUTED2(ViewHostMsg_CreateWindowWithRoute, |
int /* route_id */, |
- HANDLE /* modal_dialog_event */) |
-#endif // defined(OS_WIN) |
+ ModalDialogEvent /* modal_dialog_event */) |
IPC_MESSAGE_ROUTED2(ViewHostMsg_CreateWidgetWithRoute, |
int /* route_id */, |
@@ -643,7 +629,7 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
// generates a ViewMsg_ScrollRect_ACK message. |
IPC_MESSAGE_ROUTED1(ViewHostMsg_ScrollRect, |
ViewHostMsg_ScrollRect_Params) |
-#endif // defined(OS_WIN) |
+#endif |
// Acknowledges receipt of a ViewMsg_HandleInputEvent message. |
// Payload is a WebInputEvent::Type which is the type of the event, followed |
@@ -654,12 +640,10 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus) |
IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur) |
-#if defined(OS_WIN) |
// Returns the window location of the given window. |
IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect, |
- HWND /* window */, |
+ gfx::NativeViewId /* window */, |
gfx::Rect /* Out: Window location */) |
-#endif // defined(OS_WIN) |
IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor) |
// Result of string search in the page. |
@@ -850,12 +834,12 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
// Please see ResourceMessageFilter::OnLoadFont for details. |
IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_LoadFont, |
LOGFONT /* font data */) |
+#endif // defined(OS_WIN) |
// Returns ScreenInfo corresponding to the given window. |
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetScreenInfo, |
- gfx::NativeView /* window */, |
+ gfx::NativeViewId /* window */, |
webkit_glue::ScreenInfo /* results */) |
-#endif // defined(OS_WIN) |
// Send the tooltip text for the current mouse position to the browser. |
IPC_MESSAGE_ROUTED1(ViewHostMsg_SetTooltipText, |
@@ -967,7 +951,7 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
// final print settings. The output parameter is the same as |
// ViewMsg_PrintPages which is executed implicitly. |
IPC_SYNC_MESSAGE_ROUTED3_1(ViewHostMsg_ScriptedPrint, |
- HWND /* host_window */, |
+ gfx::NativeViewId /* host_window */, |
int /* cookie */, |
int /* expected_pages_count */, |
ViewMsg_PrintPages_Params /* settings choosen by |
@@ -1106,18 +1090,16 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) |
IPC_MESSAGE_ROUTED1(ViewHostMsg_UnloadListenerChanged, |
bool /* has_listener */) |
-#if defined(OS_WIN) |
// Returns the window location of the window this widget is embeded. |
IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect, |
- HWND /* window */, |
+ gfx::NativeViewId /* window */, |
gfx::Rect /* Out: Window location */) |
// Returns the resizer box location in the window this widget is embeded. |
// Important for Mac OS X, but not Win or Linux. |
IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowResizerRect, |
- HWND /* window */, |
+ gfx::NativeViewId /* window */, |
gfx::Rect /* Out: Window location */) |
-#endif // defined(OS_WIN) |
// Queries the browser for suggestion for autofill in a form input field. |
IPC_MESSAGE_ROUTED4(ViewHostMsg_QueryFormFieldAutofill, |