diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 20:19:49 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 20:19:49 +0000 |
commit | c7c0d823a81dc5f0951388d3c93498e3c8c770c8 (patch) | |
tree | 1fe905ecf30c3d37017a85fb86a6d213b4c9dce5 /content/browser/web_contents/web_contents_impl.h | |
parent | 02c04c948d2c317873a8f82b47eb2e44b4e64b33 (diff) | |
download | chromium_src-c7c0d823a81dc5f0951388d3c93498e3c8c770c8.zip chromium_src-c7c0d823a81dc5f0951388d3c93498e3c8c770c8.tar.gz chromium_src-c7c0d823a81dc5f0951388d3c93498e3c8c770c8.tar.bz2 |
Preserve Page::openedByDOM state across process swaps.
Every Page in Blink has an openedByDOM bit which partially determines whether
window.close() may be called. This bit is equivalent to whether the WebContents
was created with an opener. Move this bit up to WebContents and forward it to
new renderers to be preserved across process swaps. Add a suite of tests to
ensure it's preserved correctly.
This also fixes a bug where the bit was not preserved for blocked-then-opened
popups. Add a test for this case.
BUG=357579
Review URL: https://codereview.chromium.org/212703005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.h')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 71421df..cc4f435 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -896,6 +896,10 @@ class CONTENT_EXPORT WebContentsImpl // is closed. WebContentsImpl* opener_; + // True if this tab was opened by another tab. This is not unset if the opener + // is closed. + bool created_with_opener_; + #if defined(OS_WIN) gfx::NativeViewAccessible accessible_parent_; #endif |