- Electron version: 1.2.2
- Operating system: Linux

This is a problem only in linux. It works in OSX.

``` javascript
win.hide()
win.capturePage(function(img){
 // never called
})
```

shell/browser/api/electron_api_web_contents.cc
ontents()->NotifyPreferencesChanged();
  WebContentsPermissionHelper::CreateForWebContents(ontents());
  SecurityStateTabHelper::CreateForWebContents(ontents());
  InitZoomController(ontents(), options);
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
  extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
      ontents());
  script_executor_.reset(new extensions::ScriptExecutor(ontents()));
#endif
  AutofillDriverFactory::CreateForWebContents(ontents());
  ontents()->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly(
                                           GetBrowserContext()->GetUserAgent()),
                                       false);
  if (IsGuest()) {
    NativeWindow* owner_window = nullptr;
    if (embedder_) {
      
      auto* relay =
          NativeWindowRelay::FromWebContents(embedder_->ontents());
      if (relay)
        owner_window = relay->GetNativeWindow();
    }
    if (owner_window)
      SetOwnerWindow(owner_window);
  }
  ontents()->SetUserData(kElectronApiWebContentsKey,
                              std::make_unique<UserDataLink>(GetWeakPtr()));
}
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
void WebContents::InitWithExtensionView(v8::Isolate* isolate,