<!--
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
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "v8/include/v8.h"
namespace atom {
namespace {
bool g_suppress_renderer_process_restart = false;
std::string g_custom_service_worker_schemes = "";
void Noop(scoped_refptr<content::SiteInstance>) {
}
}  
void AtomBrowserClient::SuppressRendererProcessRestartForOnce() {
  g_suppress_renderer_process_restart = true;
}
void AtomBrowserClient::SetCustomServiceWorkerSchemes(
    const std::vector<std::string>& schemes) {
  g_custom_service_worker_schemes = base::JoinString(schemes, ",");
}
AtomBrowserClient::AtomBrowserClient() : delegate_(nullptr) {
}
AtomBrowserClient::~AtomBrowserClient() {