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 e5e9387
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2022 IBM Corporation and others. All rights reserved.
* Copyright (c) 2009, 2024 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
Expand Down Expand Up @@ -1551,6 +1551,26 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1default)
}
#endif

#ifndef NO_webkit_1web_1context_1get_1process_1model
JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1process_1model)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1process_1model_FUNC);
/*
rc = (jint)webkit_web_context_get_process_model(arg0);
*/
{
WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_process_model)
if (fp) {
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1process_1model_FUNC);
return rc;
}
#endif

#ifndef NO_webkit_1web_1context_1get_1security_1manager
JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1security_1manager)
(JNIEnv *env, jclass that, jlong arg0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2023 IBM Corporation and others. All rights reserved.
* Copyright (c) 2009, 2024 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
Expand Down Expand Up @@ -98,6 +98,7 @@ typedef enum {
webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC,
webkit_1web_1context_1get_1cookie_1manager_FUNC,
webkit_1web_1context_1get_1default_FUNC,
webkit_1web_1context_1get_1process_1model_FUNC,
webkit_1web_1context_1get_1security_1manager_FUNC,
webkit_1web_1context_1get_1type_FUNC,
webkit_1web_1context_1get_1website_1data_1manager_FUNC,
Expand Down
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
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 e5e9387

Please sign in to comment.