<!--
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
static const char* const kCommonSwitchNames[] = {
    switches::kStandardSchemes,
    switches::kEnableSandbox,
    switches::kSecureSchemes
  };
  command_line->CopySwitchesFrom(
      *base::CommandLine::ForCurrentProcess(),
      kCommonSwitchNames, arraysize(kCommonSwitchNames));
  
  if (!g_custom_service_worker_schemes.empty())
    command_line->AppendSwitchASCII(switches::kRegisterServiceWorkerSchemes,
                                    g_custom_service_worker_schemes);
#if defined(OS_WIN)
  
  PWSTR current_app_id;
  if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(&current_app_id))) {
    command_line->AppendSwitchNative(switches::kAppUserModelId, current_app_id);
    CoTaskMemFree(current_app_id);
  }
#endif
  if (delegate_) {
    auto app_path = static_cast<api::App*>(delegate_)->GetAppPath();
    command_line->AppendSwitchPath(switches::kAppPath, app_path);
  }
  content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
  if (web_contents)
    WebContentsPreferences::AppendExtraCommandLineSwitches(
        web_contents, command_line);
}
void AtomBrowserClient::DidCreatePpapiPlugin(