From 2799c02a46d0d8d2726f19c8b100ff67504a7349 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Sat, 7 Nov 2009 15:39:55 +0000 Subject: Amit, please review everything. jam, please review changes to the plugin create channel IPCs. mpcomplete, please review changes to chrome_plugin_host.cc ChromeFrame needs to intercept URL requests issued directly by plugins like gears to ensure that they get routed through the host browser network stack. We decide whether or not a request is to be handled based on the renderer process id and the render view id (routing id), which get passed in the ViewHostMsg_RequestResource IPC. If this request is issued by Gears then the routing id comes in as MSG_ROUTING_NONE, which causes the request to go through the chrome network stack. Fix is to pass the host render view id to the plugin in the PluginMsg_Init IPC. The plugin already receives the renderer process id. Both these ids now come back in the ViewHostMsg_RequestResource IPC. This fixes an issue with wave when rendered in full tab mode in ChromeFrame, where dropping a file into a wave would cause the renderer to hang. Fixes bug http://code.google.com/p/chromium/issues/detail?id=23992 Bug=23992 Review URL: http://codereview.chromium.org/370007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31387 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/render_messages.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'chrome/common/render_messages.h') diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 3409a3d..3ce88e8 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -340,6 +340,15 @@ struct ViewHostMsg_Resource_Request { // Optional upload data (may be null). scoped_refptr upload_data; + + // The following two members are specified if the request is initiated by + // a plugin like Gears. + + // Contains the id of the host renderer. + int host_renderer_id; + + // Contains the id of the host render view. + int host_render_view_id; }; // Parameters for a render request. @@ -1255,6 +1264,8 @@ struct ParamTraits { WriteParam(m, p.request_context); WriteParam(m, p.appcache_host_id); WriteParam(m, p.upload_data); + WriteParam(m, p.host_renderer_id); + WriteParam(m, p.host_render_view_id); } static bool Read(const Message* m, void** iter, param_type* r) { return @@ -1270,7 +1281,9 @@ struct ParamTraits { ReadParam(m, iter, &r->resource_type) && ReadParam(m, iter, &r->request_context) && ReadParam(m, iter, &r->appcache_host_id) && - ReadParam(m, iter, &r->upload_data); + ReadParam(m, iter, &r->upload_data) && + ReadParam(m, iter, &r->host_renderer_id) && + ReadParam(m, iter, &r->host_render_view_id); } static void Log(const param_type& p, std::wstring* l) { l->append(L"("); @@ -1293,6 +1306,10 @@ struct ParamTraits { LogParam(p.request_context, l); l->append(L", "); LogParam(p.appcache_host_id, l); + l->append(L", "); + LogParam(p.host_renderer_id, l); + l->append(L", "); + LogParam(p.host_render_view_id, l); l->append(L")"); } }; -- cgit v1.1