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

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)

Created:
4 years, 2 months ago by EhsanK
Modified:
4 years, 1 month ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, James Su, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow MimeHandlerViewGuest be embedded inside OOPIFs. Event routing for BrowserPlugin-based guests, along with some other IPCs, is through the embedder's RenderWidgetHost. Normally the embedder is the owner WebContents. However, when loading a PDF inside an out of process <iframe>, considering the WebContents as the embedder is incorrect as the actual BrowserPlugin lives in the <iframe> process. This CL will use the RWH corresponding to the embedder frame for event routing. BUG=649856 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/51ca2097b0b7c1a6097c63690b5ca982b65924e4 Cr-Commit-Position: refs/heads/master@{#432779}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebased #

Patch Set 4 : Added a test #

Patch Set 5 : Fixed a compile error #

Patch Set 6 : Added a NOTREACHED #

Total comments: 18

Patch Set 7 : Setting embedder frame id when the MimeHandlerViewGuest is created. #

Total comments: 14

Patch Set 8 : Addressing creis@, wjmaclean@, and kenrb@ comments #

Patch Set 9 : Rebase and nits #

Total comments: 20

Patch Set 10 : Addressing lfg@ comments + Fixing embed.postMessage #

Patch Set 11 : Rebased #

Total comments: 32

Patch Set 12 : Addressing lfg@ and nasko@ comments #

Total comments: 30

Patch Set 13 : Addressing creis@'s, alexmos@'s, and fsamuel@'s comments #

Total comments: 2

Patch Set 14 : Rebased #

Total comments: 3

Patch Set 15 : Addressing alexmos@'s comment (fixes the compile error) #

Patch Set 16 : Fixed a compile error #

Patch Set 17 : Rebased #

Patch Set 18 : Addressing nasko@'s comments #

Patch Set 19 : Fixed an input routing issue with nested browser plugings #

Total comments: 3

Patch Set 20 : Fixed a compile error and added some comments #

Total comments: 10

Patch Set 21 : Addressing creis@'s comments #

Patch Set 22 : Observing life time of embedder frame #

Patch Set 23 : Fixed a Compile Error #

Patch Set 24 : Added a comment #

Total comments: 8

Patch Set 25 : Compile Error: Added the missing 'override' #

Patch Set 26 : Addressing creis@'s comments #

Patch Set 27 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -35 lines) Patch
M chrome/browser/chrome_site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 3 chunks +55 lines, -0 lines 0 comments Download
A chrome/test/data/page_with_embedded_pdf.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 19 20 21 22 23 24 25 26 1 chunk +7 lines, -0 lines 0 comments Download
M components/guest_view/browser/guest_view_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +10 lines, -0 lines 0 comments Download
M components/guest_view/browser/guest_view_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 5 chunks +37 lines, -3 lines 0 comments Download
M components/guest_view/browser/guest_view_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +9 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 6 chunks +39 lines, -19 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +24 lines, -1 line 0 comments Download
M content/public/browser/browser_plugin_guest_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +12 lines, -0 lines 0 comments Download
M content/public/browser/browser_plugin_guest_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +12 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extensions_guest_view_message_filter.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +11 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +57 lines, -5 lines 0 comments Download

Messages

Total messages: 126 (93 generated)
EhsanK
Could you please take a look at this CL, specifically, for test (owner LGTM): alexmos@ ...
4 years, 2 months ago (2016-10-18 21:40:29 UTC) #28
Charlie Reis
Thanks for taking on this fix! I'll defer to the <webview> folks for most of ...
4 years, 2 months ago (2016-10-18 22:52:20 UTC) #31
Charlie Reis
[+site-isolation-reviews]
4 years, 2 months ago (2016-10-18 22:52:50 UTC) #32
wjmaclean
Generally looks ok, with a few comments. I'm ok with this, but would like lfg@ ...
4 years, 2 months ago (2016-10-20 14:47:22 UTC) #38
kenrb
A couple of nits. https://codereview.chromium.org/2417693002/diff/140001/components/guest_view/browser/guest_view_message_filter.cc File components/guest_view/browser/guest_view_message_filter.cc (right): https://codereview.chromium.org/2417693002/diff/140001/components/guest_view/browser/guest_view_message_filter.cc#newcode111 components/guest_view/browser/guest_view_message_filter.cc:111: manager->AttachGuest(render_process_id_, element_instance_id, It isn't worth ...
4 years, 2 months ago (2016-10-20 16:12:05 UTC) #39
wjmaclean
On 2016/10/20 16:12:05, kenrb wrote: > A couple of nits. . . . > > ...
4 years, 2 months ago (2016-10-20 17:03:23 UTC) #40
EhsanK
PTAL. https://codereview.chromium.org/2417693002/diff/120001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2417693002/diff/120001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode304 chrome/browser/chrome_site_per_process_browsertest.cc:304: // Navigate subframe to a page with an ...
4 years, 2 months ago (2016-10-20 21:41:18 UTC) #47
EhsanK
https://codereview.chromium.org/2417693002/diff/180001/extensions/browser/guest_view/extensions_guest_view_message_filter.cc File extensions/browser/guest_view/extensions_guest_view_message_filter.cc (right): https://codereview.chromium.org/2417693002/diff/180001/extensions/browser/guest_view/extensions_guest_view_message_filter.cc#newcode172 extensions/browser/guest_view/extensions_guest_view_message_filter.cc:172: guest_view->SetEmbedderFrame(embedder_render_process_id, This happens before attach which was used previously.
4 years, 2 months ago (2016-10-20 21:42:38 UTC) #48
lfg
Mostly looks good, I'm just not sure about the proxy creation and if a postMessage ...
4 years, 2 months ago (2016-10-20 22:50:50 UTC) #49
EhsanK
Thanks for the reviews! PTAL. Adding nasko@ for some input on handling post messages in ...
4 years, 1 month ago (2016-10-25 19:30:51 UTC) #55
lfg
Sorry for the delay, the patch l-g-t-m pending the change in RWHVB and the proxy ...
4 years, 1 month ago (2016-10-27 15:53:23 UTC) #58
nasko
Some initial comments to ensure I am properly understanding the CL. Also, I didn't see ...
4 years, 1 month ago (2016-10-27 21:03:41 UTC) #59
EhsanK
Thanks lfg@ and nasko@ for the reviews: lfg@: Added a TODO in browser_plugin_guest.cc. nasko@: The ...
4 years, 1 month ago (2016-10-27 22:06:48 UTC) #60
Charlie Reis
Thanks-- seems better, though some of this will be nice to clean up when we ...
4 years, 1 month ago (2016-11-02 20:47:07 UTC) #61
alexmos
I only looked at the test - just a couple of minor comments. https://codereview.chromium.org/2417693002/diff/240001/chrome/browser/chrome_site_per_process_browsertest.cc File ...
4 years, 1 month ago (2016-11-02 22:22:39 UTC) #62
lfg
Sorry for the delay, I missed this CL. lgtm if alexmos@ is happy.
4 years, 1 month ago (2016-11-08 16:08:57 UTC) #63
Fady Samuel
https://codereview.chromium.org/2417693002/diff/240001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/2417693002/diff/240001/components/guest_view/browser/guest_view_manager.cc#newcode466 components/guest_view/browser/guest_view_manager.cc:466: if (guest_view->IsViewType("mimehandler")) { drive-by: This is a layering violation. ...
4 years, 1 month ago (2016-11-08 16:14:24 UTC) #65
EhsanK
Thank you all for the reviews! Please, take another look. https://codereview.chromium.org/2417693002/diff/240001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2417693002/diff/240001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode311 ...
4 years, 1 month ago (2016-11-08 23:10:17 UTC) #67
alexmos
Thanks, the test LGTM with a nit. https://codereview.chromium.org/2417693002/diff/260001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2417693002/diff/260001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode341 chrome/browser/chrome_site_per_process_browsertest.cc:341: guest_view_manager->WaitForSingleGuestCreated(1U); The ...
4 years, 1 month ago (2016-11-08 23:21:45 UTC) #69
nasko
https://codereview.chromium.org/2417693002/diff/220001/components/guest_view/browser/guest_view_base.cc File components/guest_view/browser/guest_view_base.cc (right): https://codereview.chromium.org/2417693002/diff/220001/components/guest_view/browser/guest_view_base.cc#newcode420 components/guest_view/browser/guest_view_base.cc:420: GetEmbedderFrame()->GetView()->GetRenderWidgetHost()->Send( On 2016/10/27 22:06:48, EhsanK wrote: > On 2016/10/27 ...
4 years, 1 month ago (2016-11-09 01:13:07 UTC) #74
EhsanK
nasko@/creis@: Please take a look. I also have one question from wjmaclean@ on RenderWidgetHostInputEventRouter. Thanks! ...
4 years, 1 month ago (2016-11-15 19:54:22 UTC) #87
wjmaclean
https://codereview.chromium.org/2417693002/diff/380001/content/browser/renderer_host/render_widget_host_input_event_router.cc File content/browser/renderer_host/render_widget_host_input_event_router.cc (right): https://codereview.chromium.org/2417693002/diff/380001/content/browser/renderer_host/render_widget_host_input_event_router.cc#newcode204 content/browser/renderer_host/render_widget_host_input_event_router.cc:204: while (owner_view->IsRenderWidgetHostViewGuest()) { On 2016/11/15 19:54:22, EhsanK wrote: > ...
4 years, 1 month ago (2016-11-15 20:02:39 UTC) #88
Charlie Reis
Thanks for your patience looking through these issues. It looks pretty close, but I'm concerned ...
4 years, 1 month ago (2016-11-15 23:45:33 UTC) #95
EhsanK
Charlie, could you please take another look. While working on redoing the API I noticed ...
4 years, 1 month ago (2016-11-16 21:27:31 UTC) #100
Charlie Reis
Thanks for updating the API. LGTM with nits! On 2016/11/16 21:27:31, EhsanK wrote: > Charlie, ...
4 years, 1 month ago (2016-11-16 22:25:27 UTC) #101
EhsanK
Thanks Charlie. I will CQ soon. I will also submit a few follow-up CLs (at ...
4 years, 1 month ago (2016-11-16 22:47:50 UTC) #104
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2417693002/520001
4 years, 1 month ago (2016-11-16 23:32:31 UTC) #108
commit-bot: I haz the power
Failed to apply patch for content/browser/browser_plugin/browser_plugin_guest.cc: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-17 01:58:32 UTC) #112
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2417693002/540001
4 years, 1 month ago (2016-11-17 02:51:30 UTC) #118
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_clang_dbg_recipe on ...
4 years, 1 month ago (2016-11-17 04:39:41 UTC) #120
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2417693002/540001
4 years, 1 month ago (2016-11-17 05:32:40 UTC) #122
commit-bot: I haz the power
Committed patchset #27 (id:540001)
4 years, 1 month ago (2016-11-17 06:06:29 UTC) #124
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 06:10:30 UTC) #126
Message was sent while issue was closed.
Patchset 27 (id:??) landed as
https://crrev.com/51ca2097b0b7c1a6097c63690b5ca982b65924e4
Cr-Commit-Position: refs/heads/master@{#432779}

Powered by Google App Engine
This is Rietveld 408576698