webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
IWebPolicyDelegate Interface Reference

import"IWebPolicyDelegate.idl";

Inheritance diagram for IWebPolicyDelegate:
DefaultPolicyDelegate PolicyDelegate

Public Member Functions

HRESULT decidePolicyForNavigationAction ([in] IWebView *webView, [in] IPropertyBag *actionInformation, [in] IWebURLRequest *request, [in] IWebFrame *frame, [in] IWebPolicyDecisionListener *listener)
 
HRESULT decidePolicyForNewWindowAction ([in] IWebView *webView, [in] IPropertyBag *actionInformation, [in] IWebURLRequest *request, [in] BSTR frameName, [in] IWebPolicyDecisionListener *listener)
 
HRESULT decidePolicyForMIMEType ([in] IWebView *webView, [in] BSTR type, [in] IWebURLRequest *request, [in] IWebFrame *frame, [in] IWebPolicyDecisionListener *listener)
 
HRESULT unableToImplementPolicyWithError ([in] IWebView *webView, [in] IWebError *error, [in] IWebFrame *frame)
 

Member Function Documentation

◆ decidePolicyForMIMEType()

HRESULT IWebPolicyDelegate::decidePolicyForMIMEType ( [in] IWebView webView,
[in] BSTR  type,
[in] IWebURLRequest request,
[in] IWebFrame frame,
[in] IWebPolicyDecisionListener listener 
)

webView:decidePolicyForMIMEType:request:frame: Returns the policy for content which has been partially loaded. Sent after webView:didStartProvisionalLoadForFrame: is sent on the WebFrameLoadDelegate.

Parameters
typeMIME type for the resource.
requestA NSURLRequest for the partially loaded content.
frameThe frame which is loading the URL.
listenerThe object to call when the decision is made
  • (void)webView:(WebView *)webView decidePolicyForMIMEType:(NSString *)type request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<IWebPolicyDecisionListener>)listener;

◆ decidePolicyForNavigationAction()

HRESULT IWebPolicyDelegate::decidePolicyForNavigationAction ( [in] IWebView webView,
[in] IPropertyBag *  actionInformation,
[in] IWebURLRequest request,
[in] IWebFrame frame,
[in] IWebPolicyDecisionListener listener 
)

webView:decidePolicyForNavigationAction:request:frame:decisionListener: This method is called to decide what to do with a proposed navigation.

Parameters
actionInformationDictionary that describes the action that triggered this navigation.
requestThe request for the proposed navigation
frameThe WebFrame in which the navigation is happening
listenerThe object to call when the decision is made This method will be called before loading starts, and on every redirect.
  • (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;

◆ decidePolicyForNewWindowAction()

HRESULT IWebPolicyDelegate::decidePolicyForNewWindowAction ( [in] IWebView webView,
[in] IPropertyBag *  actionInformation,
[in] IWebURLRequest request,
[in] BSTR  frameName,
[in] IWebPolicyDecisionListener listener 
)

webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener: This method is called to decide what to do with an targetted nagivation that would open a new window.

Parameters
actionInformationDictionary that describes the action that triggered this navigation.
requestThe request for the proposed navigation
frameThe frame in which the navigation is taking place
listenerThe object to call when the decision is made This method is provided so that modified clicks on a targetted link which opens a new frame can prevent the new window from being opened if they decide to do something else, like download or present the new frame in a specialized way.

If this method picks a policy of Use, the new window will be opened, and decidePolicyForNavigationAction:request:frame:decisionListner: will be called with a WebNavigationType of WebNavigationTypeOther in its action. This is to avoid possible confusion about the modifiers.

  • (void)webView:(WebView *)webView decidePolicyForNewWindowAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request newFrameName:(NSString *)frameName decisionListener:(id<WebPolicyDecisionListener>)listener;

◆ unableToImplementPolicyWithError()

HRESULT IWebPolicyDelegate::unableToImplementPolicyWithError ( [in] IWebView webView,
[in] IWebError error,
[in] IWebFrame frame 
)

webView:unableToImplementPolicy:error:forURL:inFrame: Called when a WebPolicy could not be implemented. It is up to the client to display appropriate feedback.

Parameters
policyThe policy that could not be implemented.
errorThe error that caused the policy to not be implemented.
URLThe URL of the resource for which a particular action was requested but failed.
frameThe frame in which the policy could not be implemented.
  • (void)webView:(WebView *)webView unableToImplementPolicyWithError:(NSError *)error frame:(WebFrame *)frame;

The documentation for this interface was generated from the following file: