mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
No need to get BrowserContext from NativeWindow
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user