<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:** 5.0.0-beta.8
* **Operating System:** macOS 10.13.6
* **Last Known Working Electron version:**: 4.1.4

### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->

The file name should be shown in the save dialog, as it is in Electron 4:

<img width="798" src="https://user-images.githubusercontent.com/10314059/55932619-0f63fb00-5bf0-11e9-852e-7c9ecf22ed70.png">

### Actual Behavior
<!-- A clear and concise description of what actually happened. -->

No file name is shown:

<img width="797" src="https://user-images.githubusercontent.com/10314059/55932632-1985f980-5bf0-11e9-99f7-bb058a0a0134.png">

(Also, the dialog is attached to the window in Electron 5 but not 4, I'm not sure whether that's expected or not).

### To Reproduce

Create a link to a download in `index.html`:

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
  </head>
  <body>
    <a href="https://github.com/electron/electron/releases/download/v5.0.0-beta.8/electron-v5.0.0-beta.8-win32-x64.zip">download link</a>
  </body>
</html>
```
atom/browser/atom_download_manager_delegate.cc
auto* item = download_manager_->GetDownload(download_id);
  if (!item)
    return;
  if (result) {
    
    AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
        download_manager_->GetBrowserContext());
    browser_context->prefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
                                          path.DirName());
    v8::Isolate* isolate = v8::Isolate::GetCurrent();
    v8::Locker locker(isolate);
    v8::HandleScope handle_scope(isolate);
    api::DownloadItem* download_item =
        api::DownloadItem::FromWrappedClass(isolate, item);
    if (download_item)
      download_item->SetSavePath(path);
  }
  
  
  
  const base::FilePath download_path = result ? path : base::FilePath();
  const auto interrupt_reason =
      download_path.empty() ? download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED
                            : download::DOWNLOAD_INTERRUPT_REASON_NONE;
  download_callback.Run(download_path,
                        download::DownloadItem::TARGET_DISPOSITION_PROMPT,
                        download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
                        download_path, interrupt_reason);
}
void AtomDownloadManagerDelegate::Shutdown() {