import"IWebResourceLoadDelegate.idl";
|
HRESULT | identifierForInitialRequest ([in] IWebView *webView, [in] IWebURLRequest *request, [in] IWebDataSource *dataSource, [in] unsigned long identifier) |
|
HRESULT | willSendRequest ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebURLRequest *request, [in] IWebURLResponse *redirectResponse, [in] IWebDataSource *dataSource, [out, retval] IWebURLRequest **newRequest) |
|
HRESULT | didReceiveAuthenticationChallenge ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebURLAuthenticationChallenge *challenge, [in] IWebDataSource *dataSource) |
|
HRESULT | didCancelAuthenticationChallenge ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebURLAuthenticationChallenge *challenge, [in] IWebDataSource *dataSource) |
|
HRESULT | didReceiveResponse ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebURLResponse *response, [in] IWebDataSource *dataSource) |
|
HRESULT | didReceiveContentLength ([in] IWebView *webView, [in] unsigned long identifier, [in] UINT length, [in] IWebDataSource *dataSource) |
|
HRESULT | didFinishLoadingFromDataSource ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebDataSource *dataSource) |
|
HRESULT | didFailLoadingWithError ([in] IWebView *webView, [in] unsigned long identifier, [in] IWebError *error, [in] IWebDataSource *dataSource) |
|
HRESULT | plugInFailedWithError ([in] IWebView *webView, [in] IWebError *error, [in] IWebDataSource *dataSource) |
|
◆ didCancelAuthenticationChallenge()
webView:resource:didCancelAuthenticationChallenge:fromDataSource: Cancel authentication for a given request
- Parameters
-
challenge | The NSURLAuthenticationChallenge for which to cancel authentication
- (void)webView:(WebView *)sender resource:(id)identifier didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;
|
◆ didFailLoadingWithError()
webView:resource:didFailLoadingWithError:fromDataSource: This message is sent after a load has failed to load due to an error.
- Parameters
-
webView | The WebView sending the message. |
identifier | An identifier that can be used to track the progress of a resource load across multiple call backs. |
error | The error associated with this load. |
dataSource | The dataSource that initiated the load.
- (void)webView:(WebView *)sender resource:(id)identifier didFailLoadingWithError:(NSError *)error fromDataSource:(WebDataSource *)dataSource;
|
◆ didFinishLoadingFromDataSource()
HRESULT IWebResourceLoadDelegate::didFinishLoadingFromDataSource |
( |
[in] IWebView * |
webView, |
|
|
[in] unsigned long |
identifier, |
|
|
[in] IWebDataSource * |
dataSource |
|
) |
| |
webView:resource:didFinishLoadingFromDataSource: This message is sent after a load has successfully completed.
- Parameters
-
webView | The WebView sending the message. |
identifier | An identifier that can be used to track the progress of a resource load across multiple call backs. |
dataSource | The dataSource that initiated the load.
- (void)webView:(WebView *)sender resource:(id)identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource;
|
◆ didReceiveAuthenticationChallenge()
webView:resource:didReceiveAuthenticationChallenge:fromDataSource: Start authentication for the resource, providing a challenge Call useCredential::, continueWithoutCredential or cancel on the challenge when done.
- Parameters
-
challenge | The NSURLAuthenticationChallenge to start authentication for If you do not implement this delegate method, WebKit will handle authentication automatically by prompting with a sheet on the window that the WebView is associated with.
- (void)webView:(WebView *)sender resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;
|
◆ didReceiveContentLength()
HRESULT IWebResourceLoadDelegate::didReceiveContentLength |
( |
[in] IWebView * |
webView, |
|
|
[in] unsigned long |
identifier, |
|
|
[in] UINT |
length, |
|
|
[in] IWebDataSource * |
dataSource |
|
) |
| |
webView:resource:didReceiveContentLength:fromDataSource: Multiple of these messages may be sent as data arrives.
- Parameters
-
webView | The WebView sending the message. |
identifier | An identifier that can be used to track the progress of a resource load across multiple call backs. |
length | The amount of new data received. This is not the total amount, just the new amount received. |
dataSource | The dataSource that initiated the load.
- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength:(WebNSInt)length fromDataSource:(WebDataSource *)dataSource;
|
◆ didReceiveResponse()
webView:resource:didReceiveResponse:fromDataSource: This message is sent after a response has been received for this load.
- Parameters
-
webView | The WebView sending the message. |
identifier | An identifier that can be used to track the progress of a resource load across multiple call backs. |
response | The response for the request. |
dataSource | The dataSource that initiated the load. In some rare cases, multiple responses may be received for a single load. This occurs with multipart/x-mixed-replace, or "server push". In this case, the client should assume that each new response resets progress so far for the resource back to 0, and should check the new response for the expected content length.
- (void)webView:(WebView *)sender resource:(id)identifier didReceiveResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource;
|
◆ identifierForInitialRequest()
webView:identifierForInitialRequest:fromDataSource:
- Parameters
-
webView | The WebView sending the message. |
request | The request about to be sent. |
dataSource | The datasource that initiated the load. An implementor of WebResourceLoadDelegate should provide an identifier that can be used to track the load of a single resource. This identifier will be passed as the first argument for all of the other WebResourceLoadDelegate methods. The identifier is useful to track changes to a resources request, which will be provided by one or more calls to resource:willSendRequest:redirectResponse:fromDataSource:. |
- Returns
- An identifier that will be passed back to the implementor for each callback. The identifier will be retained.
- (id)webView:(WebView *)sender identifierForInitialRequest:(NSURLRequest *)request fromDataSource:(WebDataSource *)dataSource;
◆ plugInFailedWithError()
webView:plugInFailedWithError:dataSource: Called when a plug-in is not found, fails to load or is not available for some reason.
- Parameters
-
webView | The WebView sending the message. |
error | The plug-in error. In the userInfo dictionary of the error, the object for the NSErrorFailingURLKey key is a URL string of the SRC attribute, the object for the WebKitErrorPlugInNameKey key is a string of the plug-in's name, the object for the WebKitErrorPlugInPageURLStringKey key is a URL string of the PLUGINSPAGE attribute and the object for the WebKitErrorMIMETypeKey key is a string of the TYPE attribute. Some, none or all of the mentioned attributes can be present in the userInfo. The error returns nil for userInfo when none are present. |
dataSource | The dataSource that contains the plug-in.
- (void)webView:(WebView *)sender plugInFailedWithError:(NSError *)error dataSource:(WebDataSource *)dataSource;
|
◆ willSendRequest()
resource:willSendRequest:redirectResponse:fromDataSource: This message is sent before a load is initiated. The request may be modified as necessary by the receiver.
- Parameters
-
webView | The WebView sending the message. |
identifier | An identifier that can be used to track the progress of a resource load across multiple call backs. |
request | The request about to be sent. |
redirectResponse | If the request is being made in response to a redirect we received, the response that conveyed that redirect. |
dataSource | The dataSource that initiated the load. |
- Returns
- Returns the request, which may be mutated by the implementor, although typically will be request.
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource;
The documentation for this interface was generated from the following file: