Skip to content

Commit

Permalink
Print Webkit process model
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Nov 21, 2024
1 parent 19dc75d commit 27dc506
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ public void create (Composite parent, int style) {
// Register the swt:// custom protocol for BrowserFunction calls via XMLHttpRequest
long context = WebKitGTK.webkit_web_context_get_default();
WebKitGTK.webkit_web_context_register_uri_scheme(context, SWT_PROTOCOL, RequestProc.getAddress(), 0, 0);
System.out.println("Process Model:"+WebKitGTK.webkit_web_context_get_process_model(context));
long security = WebKitGTK.webkit_web_context_get_security_manager(context);
WebKitGTK.webkit_security_manager_register_uri_scheme_as_secure(security, SWT_PROTOCOL);
}
Expand Down Expand Up @@ -2147,8 +2148,8 @@ long webkit_create_web_view (long web_view, long frame) {
newEvent.required = true;
Runnable fireOpenWindowListeners = () -> {
if (openWindowListeners != null) {
for (int i = 0; i < openWindowListeners.length; i++) {
openWindowListeners[i].open (newEvent);
for (OpenWindowListener openWindowListener : openWindowListeners) {
openWindowListener.open (newEvent);
}
}
};
Expand All @@ -2167,7 +2168,8 @@ long webkit_create_web_view (long web_view, long frame) {
browser = newEvent.browser;
}
if (browser != null && !browser.isDisposed ()) {
return ((WebKit)browser.webBrowser).webView;
webView = WebKitGTK.webkit_web_view_new_with_related_view( ((WebKit)browser.webBrowser).webView);
return webView;
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ public class WebKitGTK extends C {
/** @method flags=dynamic */
public static final native void webkit_web_context_register_uri_scheme(long context, byte[] scheme, long callback, long user_data, long user_data_destroy_func);

/** @method flags=dynamic */
public static final native int webkit_web_context_get_process_model(long context);

/** @method flags=dynamic */
public static final native int webkit_web_view_can_go_back(long web_view);

Expand Down

0 comments on commit 27dc506

Please sign in to comment.