<!--
Thanks for opening an issue! A few things to keep in mind:

- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please try reproducing your issue against
  the latest version of Electron.
- If you need general advice, join our Slack: http://atom-slack.herokuapp.com
-->

* Electron version: 1.6.8
* Operating system: MacOS

Apologies if this is a duplicate, I found issues related to `window.open`, however I believe none covered my use case

### Expected behavior

Communication between an iframe and windows it opens should be possible (via `postMessage` API). Therefore, `window.open` should behave correctly when used within an iframe.

#### Opener to opened

Calling `window.open` from within an iframe should return the created `BrowserProxyWindow`, allowing the **opener** to post messages to the **opened**

#### Opened to opener

The opened windows `window.opener` should point back to the iframes window (the window that opened it), allowing the **opened** to post messages to the **opener**

### Actual behavior

Communication between the opener and the opened window is broken in both directions when the 
opener is an iframe.

#### Opener to opened

`window.open` returns `null` when called within an iframe. Therefore,  it is impossible for the opener to communicate to the opened window. 

`window.open` uses Chromiums implementation instead of Electron's proxy from within an iframe.

#### Opened to opener

`window.opener` points to `top` instead of the iframe which opened the window. Therefore, it is impossible to communicate from the opened window to the opener window (the iframe).

### How to reproduce

The easiest way to reproduce is to:

1. open up the example electron app
2. open dev tools and insert an iframe
3. from dev tools console set the context to the iframe, and execute `window.open` (it will return `null`)
4. open the dev tools in the opened window and inspect `window.opener`... it will NOT point to the opener (the iframe) instead it will be pointing at `top`

atom/browser/atom_browser_client.cc
}
content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
    int process_id) {
  
  
  if (base::ContainsKey(pending_processes_, process_id))
    return pending_processes_[process_id];
  
  
  return WebContentsPreferences::GetWebContentsFromProcessID(process_id);
}
bool AtomBrowserClient::ShouldCreateNewSiteInstance(
    content::RenderFrameHost* render_frame_host,
    content::BrowserContext* browser_context,
    content::SiteInstance* current_instance,
    const GURL& url) {
  if (url.SchemeIs(url::kJavaScriptScheme))
    
    return false;
  int process_id = current_instance->GetProcess()->GetID();
  if (!IsRendererSandboxed(process_id)) {
    if (!RendererUsesNativeWindowOpen(process_id)) {
      
      
      return true;
    }
    auto web_contents =
        content::WebContents::FromRenderFrameHost(render_frame_host);
    if (!ChildWebContentsTracker::IsChildWebContents(web_contents)) {