Trait WebPolicyDecisionListener

Source
pub unsafe trait WebPolicyDecisionListener: NSObjectProtocol {
    // Provided methods
    unsafe fn use(&self)
       where Self: Sized + Message { ... }
    unsafe fn download(&self)
       where Self: Sized + Message { ... }
    unsafe fn ignore(&self)
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature WebPolicyDelegate only.
Expand description

This protocol is used to call back with the results of a policy decision. This provides the ability to make these decisions asyncrhonously, which means the decision can be made by prompting with a sheet, for example.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn use(&self)
where Self: Sized + Message,

👎Deprecated

Use the resource

If there remain more policy decisions to be made, then the next policy delegate method gets to decide. This will be either the next navigation policy delegate if there is a redirect, or the content policy delegate. If there are no more policy decisions to be made, the resource will be displayed inline if possible. If there is no view available to display the resource inline, then unableToImplementPolicyWithError:frame: will be called with an appropriate error.

If a new window is going to be created for this navigation as a result of frame targeting, then it will be created once you call this method.

Source

unsafe fn download(&self)
where Self: Sized + Message,

👎Deprecated

Download the resource instead of displaying it.

This method is more than just a convenience because it allows an in-progress navigation to be converted to a download based on content type, without having to stop and restart the load.

Source

unsafe fn ignore(&self)
where Self: Sized + Message,

👎Deprecated

Do nothing (but the client may choose to handle the request itself)

A policy of ignore prevents WebKit from doing anything further with the load, however, the client is still free to handle the request in some other way, such as opening a new window, opening a new window behind the current one, opening the URL in an external app, revealing the location in Finder if a file URL, etc.

Trait Implementations§

Source§

impl ProtocolType for dyn WebPolicyDecisionListener

Source§

const NAME: &'static str = "WebPolicyDecisionListener"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn WebPolicyDecisionListener

Implementations on Foreign Types§

Source§

impl<T> WebPolicyDecisionListener for ProtocolObject<T>

Implementors§