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

Issue 1473423002: Provide default implementation for WebContentsDelegate::OpenURLFromTab. (Closed)

Created:
5 years ago by alexmos
Modified:
5 years ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, Peter Beverloo, jam, darin-cc_chromium.org, mkwst+moarreviews-shell_chromium.org, jochen+watch_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

Provide default implementation for WebContentsDelegate::OpenURLFromTab. With OOPIF, when a frame in a background page is navigated cross-site from the renderer, the cross-process transfer involves using WebContentsDelegate::OpenURLFromTab to reissue the navigation, but the delegate in this case is extensions::ExtensionHost, which doesn't implement that method. As a result, the default delegate implementation is used, which just returns nullptr and drops the request. This CL provides a better default implementation for WebContentsDelegate::OpenURLFromTab, borrowing it from Shell::OpenURLFromTab. This fixes the issue with background pages and will hopefully prevent this type of issue from happening in other contexts. BUG=560510 TEST=ExtensionApiTest.(WindowOpenPopupIframe|ContentScriptExtensionProcess|DontInjectContentScriptsInBackgroundPages) with --isolate-extensions or --site-per-process Committed: https://crrev.com/35229c1ac03fd2707c8612973f6dd54a5150e9c4 Cr-Commit-Position: refs/heads/master@{#361724}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : Address Charlie's comments #

Patch Set 5 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -31 lines) Patch
M content/public/browser/web_contents_delegate.cc View 1 2 3 4 1 chunk +27 lines, -1 line 0 comments Download
M content/shell/browser/shell.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/shell/browser/shell.cc View 1 chunk +0 lines, -26 lines 0 comments Download
M testing/buildbot/chromium.fyi.json View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (3 generated)
alexmos
Charlie, can you please take a look? This is step 1 of the OpenURLFromTab issue ...
5 years ago (2015-11-24 23:38:49 UTC) #2
Charlie Reis
Thanks, LGTM with nits. On 2015/11/24 23:38:49, alexmos wrote: > Charlie, can you please take ...
5 years ago (2015-11-25 00:05:28 UTC) #3
alexmos
Thanks! https://codereview.chromium.org/1473423002/diff/40001/content/public/browser/web_contents_delegate.cc File content/public/browser/web_contents_delegate.cc (right): https://codereview.chromium.org/1473423002/diff/40001/content/public/browser/web_contents_delegate.cc#newcode25 content/public/browser/web_contents_delegate.cc:25: // CURRENT_TAB is the only one we implement ...
5 years ago (2015-11-25 19:15:39 UTC) #4
Charlie Reis
LGTM. https://codereview.chromium.org/1473423002/diff/40001/content/public/browser/web_contents_delegate.cc File content/public/browser/web_contents_delegate.cc (right): https://codereview.chromium.org/1473423002/diff/40001/content/public/browser/web_contents_delegate.cc#newcode30 content/public/browser/web_contents_delegate.cc:30: load_url_params.source_site_instance = params.source_site_instance; On 2015/11/25 19:15:39, alexmos wrote: ...
5 years ago (2015-11-25 19:34:25 UTC) #5
alexmos
Thanks! Nasko points out that it may be worthwhile to have a unified place somewhere ...
5 years ago (2015-11-25 19:48:30 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1473423002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1473423002/80001
5 years ago (2015-11-25 19:50:13 UTC) #8
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-11-25 20:10:24 UTC) #9
commit-bot: I haz the power
5 years ago (2015-11-25 20:12:03 UTC) #11
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/35229c1ac03fd2707c8612973f6dd54a5150e9c4
Cr-Commit-Position: refs/heads/master@{#361724}

Powered by Google App Engine
This is Rietveld 408576698