Track frame openers in FrameTreeNodes instead of WebContents.
commite201c7cd1473ee1ff5b677bea1d3eb80c6680ed3
authoralexmos <alexmos@chromium.org>
Wed, 10 Jun 2015 17:14:21 +0000 (10 10:14 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 10 Jun 2015 17:14:42 +0000 (10 17:14 +0000)
treec9bb5c005c182dd3b15b4b164939eb659d3f1e91
parent86c8f011706dd12451797fbc14491c8e08db8319
Track frame openers in FrameTreeNodes instead of WebContents.

This CL is the first step of refactoring frame openers to support
out-of-process iframes:

- Frame openers are now tracked by FrameTreeNodes rather than
  WebContents.  Openers can point to subframes, and this change
  ensures that a cross-process opener can be properly used for things
  like navigation or postMessage.  As part of this, the logic for
  clearing an opener when it is destroyed also moved into
  FrameTreeNode, where it uses a new Observer.

- Various renderer->browser opener plumbing is refactored to use
  RenderFrameHosts instead of RenderViewHosts, which enables a newly
  created WebContents (or rather, its main frame) to track a subframe
  opener in the browser process.

Future CLs will add support to further propagate per-frame opener
information to a new window's renderer process, so that window.opener
points to the right RenderFrameProxy in the cross-process case.

Note that a subframe does not have an opener when it is created. The
only way for it to gain an opener is if it is targeted by
window.open().  Support for this will be added in a future CL.

BUG=225940, 431769

Review URL: https://codereview.chromium.org/1086283002

Cr-Commit-Position: refs/heads/master@{#333751}
23 files changed:
android_webview/browser/aw_content_browser_client.cc
android_webview/browser/aw_content_browser_client.h
chrome/browser/chrome_content_browser_client.cc
chrome/browser/chrome_content_browser_client.h
chrome/browser/ui/blocked_content/blocked_window_params.cc
chrome/browser/ui/blocked_content/blocked_window_params.h
chromecast/browser/cast_content_browser_client.cc
chromecast/browser/cast_content_browser_client.h
content/browser/browser_plugin/browser_plugin_guest.cc
content/browser/frame_host/frame_tree_browsertest.cc
content/browser/frame_host/frame_tree_node.cc
content/browser/frame_host/frame_tree_node.h
content/browser/frame_host/render_frame_host_delegate.h
content/browser/frame_host/render_frame_host_impl.cc
content/browser/renderer_host/render_message_filter.cc
content/browser/web_contents/web_contents_impl.cc
content/browser/web_contents/web_contents_impl.h
content/public/browser/content_browser_client.cc
content/public/browser/content_browser_client.h
content/public/browser/web_contents.cc
content/public/browser/web_contents.h
content/test/test_web_contents.cc
content/test/test_web_contents.h