Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public long get() {

@SuppressWarnings({ "static-method", "unused" }) // Called from JNI
private void on_schedule_message_pump_work(
final long pbrowserProcessHandler, final long delay) {
final long pbrowserProcessHandler, final int delay) {
if (ChromiumStatic.browsers.get() <= 0
|| ChromiumStatic.disposingAny > 0) {
return;
}
ChromiumStatic.getMessageLoop().scheduleMessagePumpWork((int) delay);
ChromiumStatic.getMessageLoop().scheduleMessagePumpWork(delay);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void getCookie() {

@SuppressWarnings("unused")
private int visit(final long self, final long cefcookie, final int count,
final int total, final int delete) {
final int total, final long delete) {
final String name = cef_cookie_visitor_t
.cefswt_cookie_to_java(cefcookie);
if (WebBrowser.CookieName != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,19 @@ private int can_download(final long download_handler, final long id,
}

@SuppressWarnings({ "unused" }) // Called from JNI
private void on_before_download(final long download_handler, final long id,
private int on_before_download(final long download_handler, final long id,
final long download_item, final long suggested_name,
final long callback) {
final Optional<Path> optPath = browser.getDownloadListener()
.beforeDownload(
ChromiumLib.cefswt_cefstring_to_java(suggested_name),
cef_download_item_t.get_url(download_item));

optPath.ifPresent(path -> cef_download_item_t.before_download_callback(
callback, path.toAbsolutePath().toString()));
if (optPath.isPresent()) {
cef_download_item_t.before_download_callback(callback,
optPath.get().toAbsolutePath().toString());
return 1;
}
return 0;
}

@SuppressWarnings({ "unused" }) // Called from JNI
Expand All @@ -76,8 +79,8 @@ private void on_download_updated(final long download_handler, final long id,
if (complete || cancelled) {
final String path = cef_download_item_t
.get_full_path(download_item);
browser.getDownloadListener().downloadFinished(!cancelled,
Path.of(path));
browser.getDownloadListener()
.downloadFinished(!cancelled, Path.of(path));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private void on_dialog_closed(final long self_, final long id) {
private int on_jsdialog(final long self_, final long id,
final long origin_url, final int dialog_type,
final long message_text, final long default_prompt_text,
final long callback, final int suppress_message) {
final long callback, final long suppress_message) {
return browser.on_jsdialog(origin_url, dialog_type, message_text,
default_prompt_text, callback);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void on_before_close(final long plifeSpanHandler,

@SuppressWarnings("unused") // Called from JNI
private int on_before_popup(final long self, final long id,
final long frame, final long target_url,
final long frame, final int popupId, final long target_url,
final long target_frame_name, final int target_disposition,
final int user_gesture, final long popupFeaturesPtr,
final long windowInfo, final long client, final long settings,
Expand Down
Loading