Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Issue 9108001: Adds support for calling postMessage on a frame living in a different renderer. (Closed)

Created:
8 years, 11 months ago by Charlie Reis
Modified:
8 years, 7 months ago
CC:
chromium-reviews, jstritar+watch_chromium.org, Avi (use Gerrit), creis+watch_chromium.org, Paweł Hajdan Jr., jam, mihaip+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, ajwong+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Adds support for calling postMessage on a frame living in a different renderer. Patch partly from Karl Koscher <supersat@chromium.org>; BUG=99202 TEST=PostMessage calls work after navigating a window to a different process. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137024

Patch Set 1 #

Patch Set 2 : Merge to latest. #

Patch Set 3 : Merge to latest #

Patch Set 4 : Rename ContentFrame -> RenderFrameHost #

Patch Set 5 : Move routing from RPH to RVH #

Patch Set 6 : Remove SwapOutAndProxy #

Patch Set 7 : Remove RenderFrameHost, FrameMap, etc. #

Patch Set 8 : Recursively create opener chain. #

Patch Set 9 : Create openers properly #

Patch Set 10 : Swap out opener RenderViews on creation #

Patch Set 11 : Add unit test for opener behavior #

Patch Set 12 : Merge with trunk #

Patch Set 13 : Merge to get window opener logic. #

Patch Set 14 : Support source frame pointer. #

Patch Set 15 : Use checkAndDispatchMessageEvent #

Patch Set 16 : Add test, remove process model change, merge. #

Patch Set 17 : Minor cleanup #

Total comments: 4

Patch Set 18 : Review comments #

Total comments: 2

Patch Set 19 : Use FromRoutingID #

Total comments: 10

Patch Set 20 : Rename struct, hide FromRoutingID. #

Total comments: 2

Patch Set 21 : Remove view type check. #

Patch Set 22 : Invert check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -4 lines) Patch
M chrome/test/data/click-noreferrer-links.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -0 lines 0 comments Download
A chrome/test/data/post_message.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +29 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +148 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +40 lines, -0 lines 0 comments Download
M content/common/swapped_out_messages.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +26 lines, -0 lines 0 comments Download
M content/public/browser/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +75 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Charlie Reis
Hey Matt-- Here's the end result for supporting cross-process postMessage. It doesn't yet support sending ...
8 years, 7 months ago (2012-05-11 19:21:13 UTC) #1
Matt Perry
lgtm http://codereview.chromium.org/9108001/diff/64018/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): http://codereview.chromium.org/9108001/diff/64018/content/browser/web_contents/web_contents_impl.cc#newcode2438 content/browser/web_contents/web_contents_impl.cc:2438: RenderViewHostDelegate* source_delegate = source_rvh->GetDelegate(); Is it possible for ...
8 years, 7 months ago (2012-05-11 21:59:34 UTC) #2
Charlie Reis
Thanks, fixed. http://codereview.chromium.org/9108001/diff/64018/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): http://codereview.chromium.org/9108001/diff/64018/content/browser/web_contents/web_contents_impl.cc#newcode2438 content/browser/web_contents/web_contents_impl.cc:2438: RenderViewHostDelegate* source_delegate = source_rvh->GetDelegate(); On 2012/05/11 21:59:34, ...
8 years, 7 months ago (2012-05-11 22:36:02 UTC) #3
Charlie Reis
John, can you review for OWNERs when you're back?
8 years, 7 months ago (2012-05-11 22:36:52 UTC) #4
Matt Perry
still lgtm http://codereview.chromium.org/9108001/diff/72019/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/9108001/diff/72019/content/renderer/render_view_impl.cc#newcode583 content/renderer/render_view_impl.cc:583: ChildThread::current()->ResolveRoute(opener_id)); This can use FromRouteID too.
8 years, 7 months ago (2012-05-11 22:37:23 UTC) #5
Charlie Reis
http://codereview.chromium.org/9108001/diff/72019/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/9108001/diff/72019/content/renderer/render_view_impl.cc#newcode583 content/renderer/render_view_impl.cc:583: ChildThread::current()->ResolveRoute(opener_id)); On 2012/05/11 22:37:23, Matt Perry wrote: > This ...
8 years, 7 months ago (2012-05-11 22:43:53 UTC) #6
jam
http://codereview.chromium.org/9108001/diff/58030/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): http://codereview.chromium.org/9108001/diff/58030/content/browser/renderer_host/render_view_host_impl.cc#newcode1270 content/browser/renderer_host/render_view_host_impl.cc:1270: delegate_->RouteMessageEvent(this, params); a while back, I had gone through ...
8 years, 7 months ago (2012-05-14 06:41:45 UTC) #7
Charlie Reis
Thanks, new patch set uploaded. http://codereview.chromium.org/9108001/diff/58030/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): http://codereview.chromium.org/9108001/diff/58030/content/browser/renderer_host/render_view_host_impl.cc#newcode1270 content/browser/renderer_host/render_view_host_impl.cc:1270: delegate_->RouteMessageEvent(this, params); On 2012/05/14 ...
8 years, 7 months ago (2012-05-14 17:38:42 UTC) #8
Aaron Boodman
https://chromiumcodereview.appspot.com/9108001/diff/77019/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://chromiumcodereview.appspot.com/9108001/diff/77019/content/browser/web_contents/web_contents_impl.cc#newcode2434 content/browser/web_contents/web_contents_impl.cc:2434: if (rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance())) { Nit: invert check and return early.
8 years, 7 months ago (2012-05-14 21:27:40 UTC) #9
Charlie Reis
http://codereview.chromium.org/9108001/diff/77019/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): http://codereview.chromium.org/9108001/diff/77019/content/browser/web_contents/web_contents_impl.cc#newcode2434 content/browser/web_contents/web_contents_impl.cc:2434: if (rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance())) { On 2012/05/14 21:27:40, Aaron Boodman wrote: ...
8 years, 7 months ago (2012-05-14 23:20:36 UTC) #10
jam
8 years, 7 months ago (2012-05-14 23:58:30 UTC) #11
lgtm

Powered by Google App Engine
This is Rietveld 408576698