Trait webkit2gtk::prelude::AutomationSessionExt
source · [−]pub trait AutomationSessionExt: 'static {
fn application_info(&self) -> Option<ApplicationInfo>;
fn id(&self) -> Option<GString>;
fn set_application_info(&self, info: &ApplicationInfo);
fn connect_create_web_view<F: Fn(&Self) -> WebView + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId;
}
v2_18
only.Expand description
Required Methods
sourcefn application_info(&self) -> Option<ApplicationInfo>
fn application_info(&self) -> Option<ApplicationInfo>
Get the the previously set AutomationSession
.
Get the AutomationSession
previously set with set_application_info()
.
Returns
the AutomationSession
of self
, or None
if no one has been set.
sourcefn set_application_info(&self, info: &ApplicationInfo)
fn set_application_info(&self, info: &ApplicationInfo)
Set the application information to self
.
This information will be used by the driver service
to match the requested capabilities with the actual application information. If this information
is not provided to the session when a new automation session is requested, the creation might fail
if the client requested a specific browser name or version. This will not have any effect when called
after the automation session has been fully created, so this must be called in the callback of
signal::WebContext::automation-started
signal.
info
sourcefn connect_create_web_view<F: Fn(&Self) -> WebView + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
fn connect_create_web_view<F: Fn(&Self) -> WebView + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
This signal is emitted when the automation client requests a new
browsing context to interact with it. The callback handler should
return a WebView
created with property::WebView::is-controlled-by-automation
construct property enabled and property::WebView::automation-presentation-type
construct
property set if needed.
If the signal is emitted with “tab” detail, the returned WebView
should be
a new web view added to a new tab of the current browsing context window.
If the signal is emitted with “window” detail, the returned WebView
should be
a new web view added to a new window.
When creating a new web view and there’s an active browsing context, the new window
or tab shouldn’t be focused.
Returns
a WebView
widget.