public JBCefClient addDownloadHandler(@NotNull CefDownloadHandler handler, @NotNull CefBrowser browser) {
    return myDownloadHandler.add(handler, browser, () -> {
      myCefClient.addDownloadHandler(new CefDownloadHandler() {
        @Override
        public void onBeforeDownload(CefBrowser browser,
                                     CefDownloadItem downloadItem,
                                     String suggestedName,
                                     CefBeforeDownloadCallback callback) {
          myDownloadHandler.handleAll(browser, handler -> {
            handler.onBeforeDownload(browser, downloadItem, suggestedName, callback);
          });
        }

        @Override
        public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
          myDownloadHandler.handleAll(browser, handler -> {
            handler.onDownloadUpdated(browser, downloadItem, callback);
          });
        }
      });
    });
  }
public JBCefClient addDownloadHandler(@NotNull CefDownloadHandler handler, @NotNull CefBrowser browser)