[Webkit-unassigned] [Bug 26854] [GTK] Needs API to allow more control over outgoing requests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 31 21:26:17 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26854





--- Comment #9 from Jan Alonzo <jmalonzo at gmail.com>  2009-07-31 21:26:17 PDT ---
(From update of attachment 32134)
> -void FrameLoaderClient::dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&)
> +void FrameLoaderClient::dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest& request, const ResourceResponse&)
>  {
> -    notImplemented();
> +    WebKitWebView* webView = getViewFromFrame(m_frame);
> +    WebKitNetworkRequest* networkRequest = webkit_network_request_new_with_core_request(request);
> +
> +    g_signal_emit_by_name(webView, "outgoing-request", m_frame, identifier, networkRequest);

I think instead of sending the identifier, we can do a WebResource lookup by
identifier and send the resource instead. Thoughts?

>  void FrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&)
> @@ -860,7 +867,9 @@ void FrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader*, unsigne
>  
>  void FrameLoaderClient::dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier)
>  {
> -    notImplemented();
> +    WebKitWebView* webView = getViewFromFrame(m_frame);
> +
> +    g_signal_emit_by_name(webView, "finished-request", m_frame, identifier);

I think we might need to prefix these resource-related signal names with
resource- to avoid confusion with frame load events. So for example
resource-will-send-request, resource-load-finished, etc..

> +     * WebKitWebView::outgoing-request:
> +     * @web_view: the object which received the signal
> +     * @web_frame: the #WebKitWebFrame whose load dispatched this request
> +     * @identifier: a numeric identifier for the resource that is
> +     * being loaded; in the future you will be able to use it with the
> +     * DataSource API, to track resource loading

I think the DS API is nearly there so instead of identifier, we can send the
webresource instead as well as the datasource? Thoughts?

> +    /**
> +     * WebKitWebView::finished-request:
> +     * @web_view: the object which received the signal
> +     * @web_frame: the #WebKitWebFrame whose load dispatched this request
> +     * @identifier: a numeric identifier for the resource that is
> +     * being loaded; in the future you will be able to use it with the
> +     * DataSource API, to track resource loading

Ditto.

Patch looks good. Would be nice if we can agree on the identifier ->
webresource approach soon.

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



More information about the webkit-unassigned mailing list