[Webkit-unassigned] [Bug 16562] [gtk] Implement WebPolicyDelegate methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 22 09:49:55 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16562





------- Comment #11 from lethalman88 at gmail.com  2008-01-22 09:49 PDT -------
I've this suggestion:
1) Do not create specific responses
2) Create only one general response holding a callback, a data and an enum for
different response types

WebKitPolicy object is a GClosure.
"authentication-received" is created with g_signal_accumulator_true_handled.

Usage in the auth:

WEBKIT_AUTHENTICATION_RESPONSE_USE,
WEBKIT_AUTHENTICATION_RESPONSE_CONTINUE_WITHOUT_CREDENTIAL,
WEBKIT_AUTHENTICATION_RESPONSE_CANCEL

static authenticationChallengeResponseCb(WebKitPolicy*, int response, gpointer
data) {
...
}

FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(...)
WebKitPolicy* policy = webkit_policy_new(authenticationChallengeResponseCb,
data);
signal_emit_("authentication-received", ..., policy);
}

webkit_web_view_real_authentication_received(..., WebKitPolicy* policy) {
...
webkit_policy_response(WEBKIT_AUTHENTICATION_RESPONSE_USE);
or
webkit_policy_response(WEBKIT_AUTHENTICATION_RESPONSE_CONTINUE_WITHOUT_CREDENTIAL);
or
webkit_policy_response(WEBKIT_AUTHENTICATION_RESPONSE_CANCEL);
}

If someone connected to the signal does its job just like
real_authentication_received do and can return TRUE to stop other handlers
(including the the _real_ which would be the default behavior) from being
invoked.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list