- Electron version: 0.37.2
- Operating system: OS X 10.11.3 

https://github.com/atom/electron/pull/4700 added support for the `visibilitychange` event (thank you @zcbenz!), but that event doesn't make its way into `<webview>`s, which are always "visible" regardless of their host page's `document.visibilityState`.

Tested using the following setup

Host page:

``` coffee
console.log "<webview> host page initial visibilityState =", document.visibilityState

document.addEventListener "visibilitychange", ->
  console.log "<webview> host page visibilitychange event, visibilityState =", document.visibilityState
```

`<webview>`:

``` coffee
console.log "<webview> initial visibilityState =", document.visibilityState

addEventListener "visibilitychange", ->
  console.log "<webview> visibilitychange, visibilityState =", document.visibilityState

setInterval ->
  console.log "<webview> visibilityState =", document.visibilityState
, 3000
```

Host page logs:

```
<webview> host page initial visibilityState = visible
<webview> host page visibilitychange event, visibilityState = hidden
<webview> host page visibilitychange event, visibilityState = visible
```

`<webview>` logs:

```
<webview> initial visibilityState = visible
(24) <webview> visibilityState = visible
```

atom/browser/web_contents_preferences.cc
int guest_instance_id;
  if (web_preferences.GetInteger(options::kGuestInstanceID, &guest_instance_id))
    command_line->AppendSwitchASCII(switches::kGuestInstanceID,
                                    base::IntToString(guest_instance_id));
  
  int opener_id;
  if (web_preferences.GetInteger(options::kOpenerID, &opener_id))
    command_line->AppendSwitchASCII(switches::kOpenerID,
                                    base::IntToString(opener_id));
#if defined(OS_MACOSX)
  
  bool scroll_bounce;
  if (web_preferences.GetBoolean(options::kScrollBounce, &scroll_bounce) &&
      scroll_bounce)
    command_line->AppendSwitch(switches::kScrollBounce);
#endif
  
  std::string blink_features;
  if (web_preferences.GetString(options::kBlinkFeatures, &blink_features))
    command_line->AppendSwitchASCII(::switches::kEnableBlinkFeatures,
                                    blink_features);
  
  NativeWindow* window = NativeWindow::FromWebContents(web_contents);
  if (window) {
    bool visible = window->IsVisible() && !window->IsMinimized();
    if (!visible)  
      command_line->AppendSwitch("hidden-page");
  }
}
void WebContentsPreferences::OverrideWebkitPrefs(