diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 23:43:04 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 23:43:04 +0000 |
commit | dee7225eb729e5c65a6fad3b7d06d55754ab37dd (patch) | |
tree | 9763ef7f91e5f5f4122d534c596cb148aa432990 | |
parent | d2980947d999c2920062a263ff7919677dabb9e9 (diff) | |
download | chromium_src-dee7225eb729e5c65a6fad3b7d06d55754ab37dd.zip chromium_src-dee7225eb729e5c65a6fad3b7d06d55754ab37dd.tar.gz chromium_src-dee7225eb729e5c65a6fad3b7d06d55754ab37dd.tar.bz2 |
Revert "Make render_view_host compile on Mac & Linux, add to the build."
Review URL: http://codereview.chromium.org/18796
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8683 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 28 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 8 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host_delegate.h | 5 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_helper.cc | 5 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.h | 15 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 16 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 31 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 26 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 7 |
10 files changed, 47 insertions, 95 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index cde1556..225d6fa 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -769,6 +769,7 @@ if not env.Bit('windows'): 'printing/win_printing_context.cc', 'profile.cc', 'profile_manager.cc', + 'renderer_host/render_view_host.cc', 'renderer_host/render_widget_helper.cc', 'renderer_host/render_widget_host.cc', 'renderer_host/cross_site_resource_handler.cc', diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 15d9d63..adfebaa 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -22,6 +22,7 @@ #include "chrome/browser/renderer_host/renderer_security_policy.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/site_instance.h" +#include "chrome/browser/tab_contents/web_contents.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/thumbnail_score.h" #include "net/base/net_util.h" @@ -77,13 +78,12 @@ RenderViewHost::RenderViewHost(SiteInstance* instance, base::WaitableEvent* modal_dialog_event) : RenderWidgetHost(instance->GetProcess(), routing_id), instance_(instance), + enable_dom_ui_bindings_(false), + enable_external_host_bindings_(false), delegate_(delegate), renderer_initialized_(false), waiting_for_drag_context_response_(false), debugger_attached_(false), - enable_dom_ui_bindings_(false), - pending_request_id_(-1), - enable_external_host_bindings_(false), modal_dialog_count_(0), navigations_suspended_(false), suspended_nav_message_(NULL), @@ -129,7 +129,6 @@ bool RenderViewHost::CreateRenderView() { renderer_initialized_ = true; -#if defined(OS_WIN) HANDLE modal_dialog_event; HANDLE renderer_process_handle = process()->process().handle(); if (renderer_process_handle == NULL) @@ -149,9 +148,6 @@ bool RenderViewHost::CreateRenderView() { modal_dialog_event, delegate_->GetWebkitPrefs(), routing_id())); -#elif defined(OS_POSIX) - Send(new ViewMsg_New(delegate_->GetWebkitPrefs(), routing_id())); -#endif // Set the alternate error page, which is profile specific, in the renderer. GURL url = delegate_->GetAlternateErrorPageURL(); @@ -754,21 +750,12 @@ void RenderViewHost::Shutdown() { RenderWidgetHost::Shutdown(); } -void RenderViewHost::OnMsgCreateWindow( - int route_id, - ModalDialogEvent modal_dialog_event) { +void RenderViewHost::OnMsgCreateWindow(int route_id, + HANDLE modal_dialog_event) { RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); - if (view) { -#if defined(OS_WIN) - view->CreateNewWindow(route_id, - new base::WaitableEvent(modal_dialog_event.event)); -#else - // TODO(port) this isn't correct, since we just make up an event won't ever - // be set by the renderer. + if (view) view->CreateNewWindow(route_id, - new base::WaitableEvent(true, false)); -#endif - } + new base::WaitableEvent(modal_dialog_event)); } void RenderViewHost::OnMsgCreateWidget(int route_id, bool activatable) { @@ -1083,6 +1070,7 @@ void RenderViewHost::OnMsgRunJavaScriptMessage( StopHangMonitorTimeout(); if (modal_dialog_count_++ == 0) modal_dialog_event_->Signal(); + bool did_suppress_message = false; delegate_->RunJavaScriptMessage(message, default_prompt, flags, reply_msg, &are_javascript_messages_suppressed_); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 36ec1d1..f4c40ed 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -12,11 +12,9 @@ #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/renderer_host/render_widget_host.h" #include "chrome/common/page_zoom.h" -#include "chrome/common/render_messages.h" #ifdef CHROME_PERSONALIZATION #include "chrome/personalization/personalization.h" #endif -#include "net/base/load_states.h" #include "webkit/glue/password_form_dom_manager.h" #include "webkit/glue/autofill_form.h" @@ -43,6 +41,10 @@ namespace gfx { class Point; } +namespace net { +enum LoadState; +} + namespace webkit_glue { struct WebApplicationInfo; } @@ -414,7 +416,7 @@ class RenderViewHost : public RenderWidgetHost { virtual void NotifyRendererResponsive(); // IPC message handlers. - void OnMsgCreateWindow(int route_id, ModalDialogEvent modal_dialog_event); + void OnMsgCreateWindow(int route_id, HANDLE modal_dialog_event); void OnMsgCreateWidget(int route_id, bool activatable); void OnMsgShowView(int route_id, WindowOpenDisposition disposition, diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 5a39b91..764e8ca 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -11,7 +11,6 @@ #include "base/basictypes.h" #include "chrome/browser/autofill_manager.h" #include "chrome/common/render_messages.h" -#include "net/base/load_states.h" #include "webkit/glue/webpreferences.h" class NavigationEntry; @@ -35,6 +34,10 @@ namespace gfx { class Rect; } +namespace net { +enum LoadState; +} + // // RenderViewHostDelegate // diff --git a/chrome/browser/renderer_host/render_widget_helper.cc b/chrome/browser/renderer_host/render_widget_helper.cc index 3e34340..d92ff301 100644 --- a/chrome/browser/renderer_host/render_widget_helper.cc +++ b/chrome/browser/renderer_host/render_widget_helper.cc @@ -204,10 +204,9 @@ void RenderWidgetHelper::CreateNewWindow(int opener_id, *route_id = GetNextRoutingID(); #if defined(OS_WIN) - ModalDialogEvent event; - event.event = CreateEvent(NULL, TRUE, FALSE, NULL); + HANDLE event = CreateEvent(NULL, TRUE, FALSE, NULL); BOOL result = DuplicateHandle(GetCurrentProcess(), - event.event, + event, render_process, modal_dialog_event, SYNCHRONIZE, diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index 2e769ec..70d6cf5 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -5,19 +5,14 @@ #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ +#include <windows.h> + #include <vector> #include "base/gfx/size.h" #include "base/timer.h" -#include "build/build_config.h" #include "chrome/common/ipc_channel.h" -#if defined(OS_WIN) -// TODO(port) when the bitmaps below use a cross-platform representation this -// can be removed. -#include <windows.h> -#endif - namespace gfx { class Rect; } @@ -260,9 +255,6 @@ class RenderWidgetHost : public IPC::Channel::Listener { void OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control, const gfx::Rect& caret_rect); -#if defined(OS_WIN) - // TODO(port) use a cross-platform representation of the bitmap. - // Paints the given bitmap to the current backing store at the given location. void PaintBackingStoreRect(HANDLE bitmap, const gfx::Rect& bitmap_rect, @@ -276,8 +268,7 @@ class RenderWidgetHost : public IPC::Channel::Listener { int dx, int dy, const gfx::Rect& clip_rect, const gfx::Size& view_size); -#endif - + // The View associated with the RenderViewHost. The lifetime of this object // is associated with the lifetime of the Render process. If the Renderer // crashes, its View is destroyed and this pointer becomes NULL, even though diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index f86ada6..499b205 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -198,8 +198,6 @@ A54612DC0EE9958600A8EE5D /* extensions_service_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = A54612DB0EE9958600A8EE5D /* extensions_service_unittest.cc */; }; A54612E20EE995F600A8EE5D /* extensions_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = A54612D90EE9957000A8EE5D /* extensions_service.cc */; }; A76E43A40F29039C009A7E88 /* browser_render_process_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E43A30F29039C009A7E88 /* browser_render_process_host.cc */; }; - A76E43CC0F29115A009A7E88 /* render_view_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E429D0F28ED73009A7E88 /* render_view_host.cc */; }; - A7AD09FB0F2E193E004A02B8 /* render_process_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EC10F2144D500861FAC /* render_process_host.cc */; }; B502DA280F098056005BE90C /* visit_database_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFA180E9D48F7009A6919 /* visit_database_unittest.cc */; }; B502DA520F098888005BE90C /* l10n_util.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFBC90E9D4C9F009A6919 /* l10n_util.cc */; }; B503E0F00F0175FD00547DC6 /* user_script_slave.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CC90EAE868600EBCFC0 /* user_script_slave.cc */; }; @@ -1291,6 +1289,7 @@ 4D7BF9070E9D4839009A6919 /* sandbox_policy.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sandbox_policy.cc; sourceTree = "<group>"; }; 4D7BF9080E9D4839009A6919 /* sandbox_policy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sandbox_policy.h; sourceTree = "<group>"; }; 4D7BF9090E9D4839009A6919 /* sanity_uitest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sanity_uitest.cc; sourceTree = "<group>"; }; + 4D7BF90A0E9D4839009A6919 /* security_style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = security_style.h; sourceTree = "<group>"; }; 4D7BF9100E9D4839009A6919 /* session_history_uitest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = session_history_uitest.cc; sourceTree = "<group>"; }; 4D7BF91A0E9D4839009A6919 /* session_startup_pref.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = session_startup_pref.cc; sourceTree = "<group>"; }; 4D7BF91B0E9D4839009A6919 /* session_startup_pref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = session_startup_pref.h; sourceTree = "<group>"; }; @@ -1689,9 +1688,6 @@ A76E42AE0F28EDB5009A7E88 /* render_view_host_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = render_view_host_manager.h; path = tab_contents/render_view_host_manager.h; sourceTree = "<group>"; }; A76E43970F29022A009A7E88 /* browser_render_process_host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = browser_render_process_host.h; path = renderer_host/browser_render_process_host.h; sourceTree = "<group>"; }; A76E43A30F29039C009A7E88 /* browser_render_process_host.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = browser_render_process_host.cc; path = renderer_host/browser_render_process_host.cc; sourceTree = "<group>"; }; - A7AD096F0F2E1825004A02B8 /* backing_store.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = backing_store.cc; path = renderer_host/backing_store.cc; sourceTree = "<group>"; }; - A7AD09700F2E1825004A02B8 /* backing_store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = backing_store.h; path = renderer_host/backing_store.h; sourceTree = "<group>"; }; - A7AD0BD10F2E2E11004A02B8 /* security_style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = security_style.h; path = tab_contents/security_style.h; sourceTree = "<group>"; }; B503E0FB0F01764800547DC6 /* user_script_slave_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_script_slave_unittest.cc; sourceTree = "<group>"; }; B54BD8FA0ED622C00093FD54 /* mach_message_source_mac.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mach_message_source_mac.cc; sourceTree = "<group>"; }; B54BD8FB0ED622C00093FD54 /* mach_message_source_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mach_message_source_mac.h; sourceTree = "<group>"; }; @@ -1762,6 +1758,8 @@ B6CCB9D80F1EC32700106F0D /* navigation_controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = navigation_controller.h; path = tab_contents/navigation_controller.h; sourceTree = "<group>"; }; B6CCB9D90F1EC32700106F0D /* navigation_entry.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = navigation_entry.cc; path = tab_contents/navigation_entry.cc; sourceTree = "<group>"; }; B6CCB9DA0F1EC32700106F0D /* navigation_entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = navigation_entry.h; path = tab_contents/navigation_entry.h; sourceTree = "<group>"; }; + B6CCB9DB0F1EC32700106F0D /* network_status_view.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = network_status_view.cc; path = tab_contents/network_status_view.cc; sourceTree = "<group>"; }; + B6CCB9DC0F1EC32700106F0D /* network_status_view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_status_view.h; path = tab_contents/network_status_view.h; sourceTree = "<group>"; }; B6CCB9DD0F1EC32700106F0D /* page_navigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = page_navigator.h; path = tab_contents/page_navigator.h; sourceTree = "<group>"; }; B6CCB9DE0F1EC32700106F0D /* provisional_load_details.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = provisional_load_details.cc; path = tab_contents/provisional_load_details.cc; sourceTree = "<group>"; }; B6CCB9DF0F1EC32700106F0D /* provisional_load_details.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = provisional_load_details.h; path = tab_contents/provisional_load_details.h; sourceTree = "<group>"; }; @@ -2430,6 +2428,7 @@ 4D7BF9070E9D4839009A6919 /* sandbox_policy.cc */, 4D7BF9080E9D4839009A6919 /* sandbox_policy.h */, 4D7BF9090E9D4839009A6919 /* sanity_uitest.cc */, + 4D7BF90A0E9D4839009A6919 /* security_style.h */, 4D7BF9100E9D4839009A6919 /* session_history_uitest.cc */, 4D7BF91A0E9D4839009A6919 /* session_startup_pref.cc */, 4D7BF91B0E9D4839009A6919 /* session_startup_pref.h */, @@ -3102,6 +3101,8 @@ B6CCB9D80F1EC32700106F0D /* navigation_controller.h */, B6CCB9D90F1EC32700106F0D /* navigation_entry.cc */, B6CCB9DA0F1EC32700106F0D /* navigation_entry.h */, + B6CCB9DB0F1EC32700106F0D /* network_status_view.cc */, + B6CCB9DC0F1EC32700106F0D /* network_status_view.h */, B6CCB9DD0F1EC32700106F0D /* page_navigator.h */, B6CCB9DE0F1EC32700106F0D /* provisional_load_details.cc */, B6CCB9DF0F1EC32700106F0D /* provisional_load_details.h */, @@ -3111,7 +3112,6 @@ A76E42AC0F28EDB5009A7E88 /* render_view_context_menu_controller.h */, A76E42AD0F28EDB5009A7E88 /* render_view_host_manager.cc */, A76E42AE0F28EDB5009A7E88 /* render_view_host_manager.h */, - A7AD0BD10F2E2E11004A02B8 /* security_style.h */, B6CCB9E00F1EC32700106F0D /* site_instance.cc */, B6CCB9E10F1EC32700106F0D /* site_instance.h */, B6CCB9E20F1EC32700106F0D /* status_view.cc */, @@ -3271,8 +3271,6 @@ children = ( E45075DA0F150A53003BE099 /* async_resource_handler.cc */, E45075DB0F150A53003BE099 /* async_resource_handler.h */, - A7AD096F0F2E1825004A02B8 /* backing_store.cc */, - A7AD09700F2E1825004A02B8 /* backing_store.h */, A76E43A30F29039C009A7E88 /* browser_render_process_host.cc */, A76E43970F29022A009A7E88 /* browser_render_process_host.h */, E45075DE0F150A6F003BE099 /* buffered_resource_handler.h */, @@ -4145,7 +4143,6 @@ B6CCB9FA0F1EC33100106F0D /* provisional_load_details.cc in Sources */, E4F324500EE5CF7C002533CE /* query_parser.cc in Sources */, E4F3247A0EE5D17E002533CE /* referrer.cc in Sources */, - A76E43CC0F29115A009A7E88 /* render_view_host.cc in Sources */, 4D7BFAF30E9D49EF009A6919 /* safe_browsing_database.cc in Sources */, E48FB9590EC4E9C10052B72B /* safe_browsing_database_bloom.cc in Sources */, E48FB95C0EC4E9DD0052B72B /* safe_browsing_database_impl.cc in Sources */, @@ -4184,7 +4181,6 @@ 4D7BFA480E9D4922009A6919 /* visitsegment_database.cc in Sources */, E48B6C3C0F27844F002E47EC /* web_data_service.cc in Sources */, E45076200F150E0C003BE099 /* web_database.cc in Sources */, - A7AD09FB0F2E193E004A02B8 /* render_process_host.cc in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index e279270ec..b0338b7 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -445,18 +445,6 @@ enum ViewHostMsg_ImeControl { IME_COMPLETE_COMPOSITION, }; -// This structure is passed around where we need a modal dialog event, which -// is currently not plumbed on Mac & Linux. -// -// TODO(port) Fix this. This structure should probably go away and we should -// do the modal dialog event in some portable way. If you remove this, be -// sure to also remove the ParamTraits for it below. -struct ModalDialogEvent { -#if defined(OS_WIN) - HANDLE event; -#endif -}; - // Multi-pass include of render_messages_internal. Preprocessor magic allows // us to use 1 header to define the enums and classes for our render messages. #define IPC_MESSAGE_MACROS_ENUMS @@ -1735,25 +1723,6 @@ struct ParamTraits<webkit_glue::ScreenInfo> { } }; -template<> -struct ParamTraits<ModalDialogEvent> { - typedef ModalDialogEvent param_type; -#if defined(OS_WIN) - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.event); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->event); - } -#else - static void Write(Message* m, const param_type& p) { - } - static bool Read(const Message* m, void** iter, param_type* p) { - return true; - } -#endif -}; - } // namespace IPC #endif // CHROME_COMMON_RENDER_MESSAGES_H_ diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index ec0edd2..1081e54 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -43,15 +43,7 @@ IPC_BEGIN_MESSAGES(View, 1) // 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 /* plugin_hwnd */, - HANDLE /* modal_dialog_event */, - WebPreferences /* preferences */, - int32 /* routing_id */) -#elif defined(OS_POSIX) - IPC_MESSAGE_CONTROL2(ViewMsg_New, - WebPreferences, /* preferences */ - int32 /* routing_id */) + IPC_MESSAGE_CONTROL4(ViewMsg_New, HWND, HANDLE, WebPreferences, int32) #endif // defined(OS_WIN) // Tells the renderer to set its maximum cache size to the supplied value @@ -503,6 +495,7 @@ 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 @@ -511,7 +504,16 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) int /* opener_id */, bool /* user_gesture */, int /* route_id */, - ModalDialogEvent /* modal_dialog_event */) + 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 // Similar to ViewHostMsg_CreateView, except used for sub-widgets, like // <select> dropdowns. This message is sent to the WebContents that @@ -521,11 +523,13 @@ 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 */, - ModalDialogEvent /* modal_dialog_event */) + HANDLE /* modal_dialog_event */) +#endif // defined(OS_WIN) IPC_MESSAGE_ROUTED2(ViewHostMsg_CreateWidgetWithRoute, int /* route_id */, diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4c81397..1d3d7af 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1855,13 +1855,12 @@ WebView* RenderView::CreateWebView(WebView* webview, bool user_gesture) { int32 routing_id = MSG_ROUTING_NONE; #if defined(OS_WIN) - ModalDialogEvent modal_dialog_event; - modal_dialog_event.event = NULL; + HANDLE modal_dialog_event = NULL; render_thread_->Send( new ViewHostMsg_CreateWindow(routing_id_, user_gesture, &routing_id, &modal_dialog_event)); if (routing_id == MSG_ROUTING_NONE) { - DCHECK(modal_dialog_event.event == NULL); + DCHECK(modal_dialog_event == NULL); return NULL; } #else // defined(OS_WIN) @@ -1877,7 +1876,7 @@ WebView* RenderView::CreateWebView(WebView* webview, bool user_gesture) { const WebPreferences& prefs = webview->GetPreferences(); base::WaitableEvent* waitable_event = new base::WaitableEvent #if defined(OS_WIN) - (modal_dialog_event.event); + (modal_dialog_event); #else (true, false); #endif |