- 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
content::WebContents* ontents,
    const content::MediaStreamRequest& request,
    content::MediaResponseCallback callback) {
  auto* permission_helper =
      WebContentsPermissionHelper::FromWebContents(ontents);
  permission_helper->RequestMediaAccessPermission(request, std::move(callback));
}
void WebContents::RequestToLockMouse(content::WebContents* ontents,
                                     bool user_gesture,
                                     bool last_unlocked_by_target) {
  auto* permission_helper =
      WebContentsPermissionHelper::FromWebContents(ontents);
  permission_helper->RequestPointerLockPermission(user_gesture);
}
content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
    content::WebContents* source) {
  if (!dialog_manager_)
    dialog_manager_ = std::make_unique<ElectronJavaScriptDialogManager>();
  return dialog_manager_.get();
}
void WebContents::OnAudioStateChanged(bool audible) {
  Emit("-audio-state-changed", audible);
}
void WebContents::BeforeUnloadFired(bool proceed,