Skip to content

Commit 40486d8

Browse files
GnorTechrogerwang
authored andcommitted
fix build on linux
1 parent d9a1fe2 commit 40486d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/browser/file_select_helper.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,13 @@ void FileSelectHelper::RunFileChooserOnUIThread(
398398
FilePath default_file_name = params.default_file_name;
399399
FilePath working_path = params.initial_path;
400400

401+
#if defined(OS_WIN)
401402
gfx::NativeWindow owning_window =
402403
(gfx::NativeWindow)::GetAncestor((HWND)render_view_host_->GetView()->GetNativeView(), GA_ROOT);
404+
#else
405+
gfx::NativeWindow owning_window =
406+
platform_util::GetTopLevel(render_view_host_->GetView()->GetNativeView());
407+
#endif
403408

404409
select_file_dialog_->SelectFile(
405410
dialog_type_,

0 commit comments

Comments
 (0)