JBCefClient (@NotNull CefDialogHandler handler, @NotNull CefBrowser browser) { return myDialogHandler.add(handler, browser, () -> { myCefClient.addDialogHandler(new CefDialogHandler() { @Override public boolean onFileDialog(CefBrowser browser, FileDialogMode mode, String title, String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback) { return myDialogHandler.handleBoolean(browser, handler -> { return handler.onFileDialog(browser, mode, title, defaultFilePath, acceptFilters, callback); }); } }); }); }