<!--
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::RenderProcessHost* host) {
  int process_id = host->GetID();
  pending_processes_.erase(process_id);
  RemoveProcessPreferences(process_id);
}
void AtomBrowserClient::RenderProcessReady(content::RenderProcessHost* host) {
  render_process_host_pids_[host->GetID()] = base::GetProcId(host->GetHandle());
  if (delegate_) {
    static_cast<api::App*>(delegate_)->RenderProcessReady(host);
  }
}
void AtomBrowserClient::RenderProcessExited(content::RenderProcessHost* host,
                                            base::TerminationStatus status,
                                            int exit_code) {
  auto host_pid = render_process_host_pids_.find(host->GetID());
  if (host_pid != render_process_host_pids_.end()) {
    if (delegate_) {
      static_cast<api::App*>(delegate_)->RenderProcessDisconnected(
          host_pid->second);
    }
    render_process_host_pids_.erase(host_pid);
  }
}
}