зеркало из https://github.com/electron/electron.git
No need to get BrowserContext from NativeWindow
This commit is contained in:
Родитель
702f1631a3
Коммит
8bbe28e998
|
@ -990,7 +990,6 @@ NativeWindowMac::NativeWindowMac(
|
|||
|
||||
NativeWindowMac::~NativeWindowMac() {
|
||||
[NSEvent removeMonitor:wheel_event_monitor_];
|
||||
Observe(nullptr);
|
||||
}
|
||||
|
||||
void NativeWindowMac::Close() {
|
||||
|
|
|
@ -235,12 +235,8 @@ void WebDialogHelper::RunFileChooser(
|
|||
NOTREACHED();
|
||||
}
|
||||
|
||||
AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
|
||||
window_->web_contents()->GetBrowserContext());
|
||||
if (!browser_context) {
|
||||
browser_context = static_cast<atom::AtomBrowserContext*>(
|
||||
render_frame_host->GetProcess()->GetBrowserContext());
|
||||
}
|
||||
auto* browser_context = static_cast<atom::AtomBrowserContext*>(
|
||||
render_frame_host->GetProcess()->GetBrowserContext());
|
||||
settings.default_path = browser_context->prefs()->GetFilePath(
|
||||
prefs::kSelectFileLastDirectory).Append(params.default_file_name);
|
||||
settings.properties = flags;
|
||||
|
|
Загрузка…
Ссылка в новой задаче