- 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
InitWithExtensionView(isolate, ontents, view_type);
  }
  extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
      ontents);
  script_executor_.reset(new extensions::ScriptExecutor(ontents));
#endif
  auto session = Session::CreateFrom(isolate, GetBrowserContext());
  session_.Reset(isolate, session.ToV8());
  ontents->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly(
                                         GetBrowserContext()->GetUserAgent()),
                                     false);
  ontents->SetUserData(kElectronApiWebContentsKey,
                            std::make_unique<UserDataLink>(GetWeakPtr()));
  InitZoomController(ontents, gin::Dictionary::CreateEmpty(isolate));
}
WebContents::WebContents(v8::Isolate* isolate,
                         std::unique_ptr<content::WebContents> ontents,
                         Type type)
    : content::WebContentsObserver(ontents.get()),
      type_(type),
      id_(GetAllWebContents().Add(this)),
      devtools_file_system_indexer_(new DevToolsFileSystemIndexer),
      file_task_runner_(
          base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()}))
#if BUILDFLAG(ENABLE_PRINTING)
      ,
      print_task_runner_(CreatePrinterHandlerTaskRunner())
#endif
{
  DCHECK(type != Type::kRemote)