No need to get BrowserContext from NativeWindow
This commit is contained in:
parent
702f1631a3
commit
8bbe28e998
2 changed files with 2 additions and 7 deletions
|
@ -990,7 +990,6 @@ NativeWindowMac::NativeWindowMac(
|
||||||
|
|
||||||
NativeWindowMac::~NativeWindowMac() {
|
NativeWindowMac::~NativeWindowMac() {
|
||||||
[NSEvent removeMonitor:wheel_event_monitor_];
|
[NSEvent removeMonitor:wheel_event_monitor_];
|
||||||
Observe(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Close() {
|
void NativeWindowMac::Close() {
|
||||||
|
|
|
@ -235,12 +235,8 @@ void WebDialogHelper::RunFileChooser(
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
|
auto* browser_context = static_cast<atom::AtomBrowserContext*>(
|
||||||
window_->web_contents()->GetBrowserContext());
|
render_frame_host->GetProcess()->GetBrowserContext());
|
||||||
if (!browser_context) {
|
|
||||||
browser_context = static_cast<atom::AtomBrowserContext*>(
|
|
||||||
render_frame_host->GetProcess()->GetBrowserContext());
|
|
||||||
}
|
|
||||||
settings.default_path = browser_context->prefs()->GetFilePath(
|
settings.default_path = browser_context->prefs()->GetFilePath(
|
||||||
prefs::kSelectFileLastDirectory).Append(params.default_file_name);
|
prefs::kSelectFileLastDirectory).Append(params.default_file_name);
|
||||||
settings.properties = flags;
|
settings.properties = flags;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue