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

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed)

Created:
4 years, 5 months ago by EhsanK
Modified:
4 years, 3 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force MimeHandlerView to always use BrowserPlugin Currently, with the flag --use-cross-process-frames-for-guests switched on, MimeHandlerView still creates a BrowserPlugin while on the browser side we expect an OOPIF based implementation. This causes PDF viewer to crash. On the other hand, GuestViews will soon use OOPIF. Hence, temporarily, we need to make MimeHandlerView an exception and force it to use BrowserPlugin's codepath even when the switch above is turned on. BUG=563285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/1beabeccb02b9c6c7e4706950dba275c95e18aa8 Cr-Commit-Position: refs/heads/master@{#420712}

Patch Set 1 #

Patch Set 2 : Return Top-Level WebContents View's NativeView rather than Owners #

Total comments: 1

Patch Set 3 : Using |attached_| to verify if |delegate_| is valid (used in IsMimeHandlerViewGuest()) #

Patch Set 4 : Using a boolean to determine whether or not BrowserPluginGuest is for MimeHandlerViewGuest #

Total comments: 7

Patch Set 5 : Addressing lfg@'s comments #

Patch Set 6 : Rebased #

Total comments: 4

Patch Set 7 : Addressing lazyboy@'s and lfg@'s comments #

Total comments: 4

Patch Set 8 : Added BrowserPluginGuestDelegateMode::DelegateMode(FromWebContents)? #

Total comments: 8

Patch Set 9 : Rebased #

Patch Set 10 : Addressing lfg@'s comments #

Patch Set 11 : Fixed a typo #

Total comments: 16

Patch Set 12 : Addressing lfg@'s comments #

Patch Set 13 : Rebased #

Patch Set 14 : Two quick fixes (One outstanding from lfg@'s comments) #

Total comments: 41

Patch Set 15 : Addressing creis@'s Comments #

Patch Set 16 : Fixed an Error in Code #

Total comments: 6

Patch Set 17 : Remove Usages of UseCrossProcessFramesForGuests in content/browser/* #

Patch Set 18 : Fixed typos #

Total comments: 8

Patch Set 19 : Changed a (newly added) TEST_F to TEST_P #

Patch Set 20 : Addressing creis@'s comments #

Patch Set 21 : Added the missing files #

Total comments: 4

Patch Set 22 : Addressing creis@'s comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -114 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +9 lines, -4 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 1 chunk +0 lines, -1 line 0 comments Download
M components/guest_view/renderer/iframe_guest_view_container.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 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 2 chunks +10 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 6 chunks +6 lines, -6 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -2 lines 2 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +9 lines, -6 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 9 chunks +13 lines, -17 lines 0 comments Download
M content/common/site_isolation_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 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 1 chunk +5 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 1 chunk +4 lines, -0 lines 0 comments Download
A content/public/browser/guest_mode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +29 lines, -0 lines 0 comments Download
A content/public/browser/guest_mode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +26 lines, -0 lines 0 comments Download
M content/public/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
D content/public/common/browser_plugin_guest_mode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -27 lines 0 comments Download
D content/public/common/browser_plugin_guest_mode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -18 lines 0 comments Download
M content/public/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
A content/public/renderer/guest_mode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +26 lines, -0 lines 0 comments Download
A + content/public/renderer/guest_mode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +32 lines, -13 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 1 chunk +2 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 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 105 (58 generated)
EhsanK
Istiaque, since we are perhaps launching OOPIF-webview sooner than MimeHandlerView can be fixed, we need ...
4 years, 5 months ago (2016-07-19 15:41:23 UTC) #4
EhsanK
Adding lfg@. Lucas: Could you please take a look? Thanks!
4 years, 5 months ago (2016-07-19 15:46:06 UTC) #6
lfg
On 2016/07/19 15:46:06, EhsanK wrote: > Adding lfg@. > Lucas: Could you please take a ...
4 years, 5 months ago (2016-07-19 16:02:49 UTC) #7
EhsanK
On 2016/07/19 16:02:49, lfg wrote: > On 2016/07/19 15:46:06, EhsanK wrote: > > Adding lfg@. ...
4 years, 5 months ago (2016-07-19 16:09:41 UTC) #8
lfg
On 2016/07/19 16:09:41, EhsanK wrote: > On 2016/07/19 16:02:49, lfg wrote: > > On 2016/07/19 ...
4 years, 5 months ago (2016-07-19 17:16:24 UTC) #11
EhsanK
Fixing some crashes. With the new fix we can now show a PDF inside a ...
4 years, 5 months ago (2016-07-19 21:48:44 UTC) #15
lfg
On 2016/07/19 21:48:44, EhsanK wrote: > Fixing some crashes. > > With the new fix ...
4 years, 5 months ago (2016-07-20 15:57:52 UTC) #22
EhsanK
On 2016/07/20 15:57:52, lfg wrote: > On 2016/07/19 21:48:44, EhsanK wrote: > > Fixing some ...
4 years, 5 months ago (2016-07-20 16:52:08 UTC) #25
lfg
Mostly looks good, just a couple of questions. https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode357 content/browser/frame_host/render_widget_host_view_guest.cc:357: return ...
4 years, 5 months ago (2016-07-20 19:49:57 UTC) #28
EhsanK
PTAL. Thanks! https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode357 content/browser/frame_host/render_widget_host_view_guest.cc:357: return guest_->GetTopLevelRenderWidgetHostView()->GetNativeView(); On 2016/07/20 19:49:57, lfg wrote: ...
4 years, 5 months ago (2016-07-20 20:49:19 UTC) #29
lfg
https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/2165523004/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode357 content/browser/frame_host/render_widget_host_view_guest.cc:357: return guest_->GetTopLevelRenderWidgetHostView()->GetNativeView(); On 2016/07/20 20:49:19, EhsanK wrote: > On ...
4 years, 5 months ago (2016-07-20 21:05:34 UTC) #30
EhsanK
Lucas: I am not sure if we can easily get rid of GetNativeView() as there ...
4 years, 5 months ago (2016-07-21 19:53:06 UTC) #31
lazyboy
https://codereview.chromium.org/2165523004/diff/100001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/2165523004/diff/100001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode510 chrome/browser/renderer_context_menu/render_view_context_menu.cc:510: if (!content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests() || I think the CL has too ...
4 years, 5 months ago (2016-07-22 01:03:30 UTC) #32
lfg
On 2016/07/21 19:53:06, EhsanK wrote: > Lucas: I am not sure if we can easily ...
4 years, 5 months ago (2016-07-22 14:02:15 UTC) #33
EhsanK
PTAL. I also made MimeHandlerViewTests run with OOPIF guest view flag. They all seem to ...
4 years, 4 months ago (2016-07-27 22:34:47 UTC) #34
lfg
Just a couple of comments. https://codereview.chromium.org/2165523004/diff/120001/content/browser/frame_host/render_widget_host_view_child_frame.cc File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): https://codereview.chromium.org/2165523004/diff/120001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode217 content/browser/frame_host/render_widget_host_view_child_frame.cc:217: return frame_connector_->GetRootRenderWidgetHostView()->GetNativeView(); I think ...
4 years, 4 months ago (2016-07-28 18:29:31 UTC) #39
EhsanK
Added a new function to check if a WebContents is either using or not using ...
4 years, 4 months ago (2016-07-29 20:23:18 UTC) #42
lfg
https://codereview.chromium.org/2165523004/diff/140001/content/public/browser/browser_plugin_guest_delegate_mode.cc File content/public/browser/browser_plugin_guest_delegate_mode.cc (right): https://codereview.chromium.org/2165523004/diff/140001/content/public/browser/browser_plugin_guest_delegate_mode.cc#newcode1 content/public/browser/browser_plugin_guest_delegate_mode.cc:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-07-30 00:05:25 UTC) #49
EhsanK
Apologies this patch took a while. Please take another look. Thanks! https://codereview.chromium.org/2165523004/diff/140001/content/public/browser/browser_plugin_guest_delegate_mode.cc File content/public/browser/browser_plugin_guest_delegate_mode.cc (right): ...
4 years, 3 months ago (2016-09-01 21:19:07 UTC) #52
EhsanK
Answered comments. PTAL. https://codereview.chromium.org/2165523004/diff/140001/content/public/browser/browser_plugin_guest_delegate_mode.h File content/public/browser/browser_plugin_guest_delegate_mode.h (right): https://codereview.chromium.org/2165523004/diff/140001/content/public/browser/browser_plugin_guest_delegate_mode.h#newcode6 content/public/browser/browser_plugin_guest_delegate_mode.h:6: #define CONTENT_PUBLIC_COMMON_BROWSER_PLUGIN_GUEST_DELEGATE_MODE_H_ On 2016/07/30 00:05:25, lfg ...
4 years, 3 months ago (2016-09-01 21:51:47 UTC) #55
lfg
https://codereview.chromium.org/2165523004/diff/200001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/2165523004/diff/200001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode512 chrome/browser/renderer_context_menu/render_view_context_menu.cc:512: WebContents::FromRenderFrameHost(render_frame_host); No need to redefine web_contents. https://codereview.chromium.org/2165523004/diff/200001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc ...
4 years, 3 months ago (2016-09-02 18:29:41 UTC) #56
EhsanK
Thanks for the reviews Lucas. PTAL. https://codereview.chromium.org/2165523004/diff/200001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/2165523004/diff/200001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode512 chrome/browser/renderer_context_menu/render_view_context_menu.cc:512: WebContents::FromRenderFrameHost(render_frame_host); On 2016/09/02 ...
4 years, 3 months ago (2016-09-02 21:01:07 UTC) #57
lfg
Thanks, lgtm.
4 years, 3 months ago (2016-09-02 21:07:34 UTC) #58
EhsanK
Thanks! Adding creis@ for content/ reviews. Charlie, could you please take a look or suggest ...
4 years, 3 months ago (2016-09-02 21:09:17 UTC) #60
Charlie Reis
On 2016/09/02 21:09:17, EhsanK wrote: > Thanks! > > Adding creis@ for content/ reviews. > ...
4 years, 3 months ago (2016-09-02 22:46:34 UTC) #62
Charlie Reis
I'm excited about the CL overall, as it will let us ship OOPIF-based guests sooner ...
4 years, 3 months ago (2016-09-07 00:22:29 UTC) #64
wjmaclean
I don't think the changes to GetNativeView() will cause me problems, though I would like ...
4 years, 3 months ago (2016-09-07 13:32:33 UTC) #65
lfg
https://codereview.chromium.org/2165523004/diff/260001/content/browser/frame_host/render_widget_host_view_child_frame.cc File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): https://codereview.chromium.org/2165523004/diff/260001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode207 content/browser/frame_host/render_widget_host_view_child_frame.cc:207: return frame_connector_->GetParentRenderWidgetHostView()->GetNativeView(); On 2016/09/07 13:32:33, wjmaclean wrote: > GetRootRenderWidgetHostView() ...
4 years, 3 months ago (2016-09-07 14:55:18 UTC) #66
wjmaclean
On 2016/09/07 14:55:18, lfg wrote: > https://codereview.chromium.org/2165523004/diff/260001/content/browser/frame_host/render_widget_host_view_child_frame.cc > File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): > > https://codereview.chromium.org/2165523004/diff/260001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode207 > ...
4 years, 3 months ago (2016-09-07 15:35:55 UTC) #67
lfg
On 2016/09/07 15:35:55, wjmaclean wrote: > > I appreciate the comment about when the frame_connector ...
4 years, 3 months ago (2016-09-07 15:43:40 UTC) #68
wjmaclean
On 2016/09/07 15:43:40, lfg wrote: > On 2016/09/07 15:35:55, wjmaclean wrote: > > > > ...
4 years, 3 months ago (2016-09-07 15:56:41 UTC) #69
EhsanK
Thanks for the reviews. Charlie: I guess the main issue here is whether we should ...
4 years, 3 months ago (2016-09-08 18:14:58 UTC) #70
Charlie Reis
Very sorry for the delay, and thanks for updating it. I think this is looking ...
4 years, 3 months ago (2016-09-15 20:56:10 UTC) #71
EhsanK
Thanks for the reviews! Charlie: I think we should keep a method like BrowserPluginGuestMode::UseCrossProcessFramesForGuests() aroudn, ...
4 years, 3 months ago (2016-09-21 21:34:53 UTC) #74
EhsanK
Adding avallee@ for focus related code paths in WebContentsImpl since he is working on those ...
4 years, 3 months ago (2016-09-21 21:36:12 UTC) #76
Charlie Reis
Thanks for following up! I think we can go a little further to make this ...
4 years, 3 months ago (2016-09-21 22:18:21 UTC) #79
EhsanK
PTAL. Thanks! https://codereview.chromium.org/2165523004/diff/260001/content/public/browser/guest_mode.h File content/public/browser/guest_mode.h (right): https://codereview.chromium.org/2165523004/diff/260001/content/public/browser/guest_mode.h#newcode21 content/public/browser/guest_mode.h:21: bool CONTENT_EXPORT IsCrossProcessFrameGuest(WebContents* web_contents); On 2016/09/21 22:18:21, ...
4 years, 3 months ago (2016-09-22 22:55:43 UTC) #88
EhsanK
PTAL. Thanks! https://codereview.chromium.org/2165523004/diff/260001/content/public/browser/guest_mode.h File content/public/browser/guest_mode.h (right): https://codereview.chromium.org/2165523004/diff/260001/content/public/browser/guest_mode.h#newcode21 content/public/browser/guest_mode.h:21: bool CONTENT_EXPORT IsCrossProcessFrameGuest(WebContents* web_contents); On 2016/09/21 22:18:21, ...
4 years, 3 months ago (2016-09-22 22:55:44 UTC) #89
Charlie Reis
Thanks for the updates! LGTM. https://codereview.chromium.org/2165523004/diff/390001/content/public/browser/guest_mode.h File content/public/browser/guest_mode.h (right): https://codereview.chromium.org/2165523004/diff/390001/content/public/browser/guest_mode.h#newcode18 content/public/browser/guest_mode.h:18: // https://crbug.com/642826 is resolved. ...
4 years, 3 months ago (2016-09-23 05:21:26 UTC) #90
EhsanK
Thank you Charlie for the review! Istiaque, could you please take another look? Thanks! https://codereview.chromium.org/2165523004/diff/390001/content/public/browser/guest_mode.h ...
4 years, 3 months ago (2016-09-23 14:53:22 UTC) #91
lfg
still lgtm https://codereview.chromium.org/2165523004/diff/410001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2165523004/diff/410001/content/browser/frame_host/render_frame_host_manager.cc#newcode43 content/browser/frame_host/render_frame_host_manager.cc:43: #include "content/public/browser/guest_mode.h" I think this isn't used ...
4 years, 3 months ago (2016-09-23 16:23:02 UTC) #92
lazyboy
extensions/* and render_view_context_menu* lgtm.
4 years, 3 months ago (2016-09-23 17:24:48 UTC) #93
EhsanK
Thanks!
4 years, 3 months ago (2016-09-23 17:48:40 UTC) #94
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/2165523004/410001
4 years, 3 months ago (2016-09-23 19:32:11 UTC) #100
commit-bot: I haz the power
Committed patchset #22 (id:410001)
4 years, 3 months ago (2016-09-23 20:18:38 UTC) #102
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/1beabeccb02b9c6c7e4706950dba275c95e18aa8 Cr-Commit-Position: refs/heads/master@{#420712}
4 years, 3 months ago (2016-09-23 20:21:33 UTC) #104
EhsanK
4 years, 3 months ago (2016-09-23 20:40:23 UTC) #105
Message was sent while issue was closed.
https://codereview.chromium.org/2165523004/diff/410001/content/browser/frame_...
File content/browser/frame_host/render_frame_host_manager.cc (right):

https://codereview.chromium.org/2165523004/diff/410001/content/browser/frame_...
content/browser/frame_host/render_frame_host_manager.cc:43: #include
"content/public/browser/guest_mode.h"
On 2016/09/23 16:23:02, lfg wrote:
> I think this isn't used anymore.

Sorry I missed this one out. Submitted a patch to remove it. Thanks!

Powered by Google App Engine
This is Rietveld 408576698