|
Propagate opener to BackgroundsContents.
Before this CL, the opener would be lost:
1. When creating the BackgroundContents:
1.1. The call from WebContentsImpl::CreateNewWindow to
Browser::ShouldCreateWebContents didn't propagate |opener|
1.2. WebContents::CreateWithSessionStorage ignored opener-related
fields in WebContents::CreateParams.
2. When inspecting the opener - WebContents::GetOpener used to return
WebContents rather than RenderFrameHost (misrepresenting an opener
that is a subframe).
This CL fixes this by:
1. Adding an |opener| parameter to WebContentsDelegate::ShouldCreateWebContents
2. Modifying constructor of BackgroundContents to take a new |opener|
parameter and to pass it to WebContents::CreateParams.
3. Modifying WebContents::CreateWithSessionStorage so that it sets
the opener on the newly created contents.
4. Changing WebContents::GetOpener and WebContents::GetOriginalOpener
methods to return RenderFrameHost.
The accurate opener was originally needed for a planned but ultimately
abandoned UMA (see https://crbug.com/718516), but having an accurate
opener is desirable in general.
This CL re-enables AppBackgroundPageApiTest.OpenThenClose which was
disabled due to flakiness 4 years ago. This test is where the
verification of the opener has to go. I cannot repro the flakiness when
trying the test locally (i.e. running the test 30 times individually,
and 20 times as part of the whole AppBackgroundPageApiTest suite) or on
the trybots (I've tried 3 x win_chromium_rel_ng, linux_chromium_rel_ng
and mac_chromium_rel_ng).
BUG= 165644, 724280
Review-Url: https://codereview.chromium.org/2882513005
Cr-Commit-Position: refs/heads/master@{#477169}
Committed: https://chromium.googlesource.com/chromium/src/+/6f8ac625db8fc02373327a9957e6633b62717d0a
Total comments: 4
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+191 lines, -70 lines) |
Patch |
|
M |
chrome/browser/android/document/document_web_contents_delegate.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/android/document/document_web_contents_delegate.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/background/background_contents.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/background/background_contents.cc
|
View
|
|
3 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/background/background_contents_service.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/background/background_contents_service.cc
|
View
|
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/content_settings/mixed_content_settings_tab_helper.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/app_background_page_apitest.cc
|
View
|
1
2
3
4
|
7 chunks |
+82 lines, -14 lines |
0 comments
|
Download
|
|
M |
chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/prerender/prerender_contents.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/blocked_content/app_modal_dialog_helper.cc
|
View
|
1
2
3
4
|
1 chunk |
+10 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/browser.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/browser.cc
|
View
|
1
2
3
4
|
5 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/offline_pages/content/background_loader/background_loader_contents.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
components/offline_pages/content/background_loader/background_loader_contents.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
components/offline_pages/content/background_loader/background_loader_contents_unittest.cc
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/web_contents_delegate_android/web_contents_delegate_android.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
components/web_contents_delegate_android/web_contents_delegate_android.cc
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/web_contents/web_contents_impl.h
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/web_contents/web_contents_impl.cc
|
View
|
1
2
3
4
|
6 chunks |
+39 lines, -27 lines |
0 comments
|
Download
|
|
M |
content/public/browser/web_contents.h
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/public/browser/web_contents_delegate.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/public/browser/web_contents_delegate.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
extensions/browser/guest_view/extension_options/extension_options_guest.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
ui/keyboard/content/keyboard_ui_content.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
ui/views/controls/webview/web_dialog_view.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
ui/views/controls/webview/web_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 64 (39 generated)
|