Package org.webkitgtk
Class WebContext.Builder<B extends WebContext.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.webkitgtk.WebContext.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
WebContext
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theWebContextobject.This signal is emitted when a new automation request is made.This signal is emitted when aWebKitWebContextneeds to set initial notification permissions for a web process.This signal is emitted when a new web process is about to be launched.This signal is emitted when aWebKitUserMessageis received from a web process extension.setMemoryPressureSettings(MemoryPressureSettings memoryPressureSettings) TheWebKitMemoryPressureSettingsapplied to the web processes created by this context.setTimeZoneOverride(String timeZoneOverride) The timezone override for this web context.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theWebContextobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toWebContext.- Overrides:
buildin classGObject.Builder<B extends WebContext.Builder<B>>- Returns:
- a new instance of
WebContextwith the properties that were set in the Builder object.
-
setMemoryPressureSettings
TheWebKitMemoryPressureSettingsapplied to the web processes created by this context.- Parameters:
memoryPressureSettings- the value for thememory-pressure-settingsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.34
-
setTimeZoneOverride
The timezone override for this web context. Setting this property provides a better alternative to configure the timezone information for all webviews managed by the WebContext. The other, less optimal, approach is to globally set the TZ environment variable in the process before creating the context. However this approach might not be very convenient and can have side-effects in your application.The expected values for this property are defined in the IANA timezone database. See this wikipedia page for instance, https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
- Parameters:
timeZoneOverride- the value for thetime-zone-overrideproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.38
-
onAutomationStarted
This signal is emitted when a new automation request is made. Note that it will never be emitted if automation is not enabled incontext,see webkit_web_context_set_automation_allowed() for more details.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.18
- See Also:
-
onInitializeNotificationPermissions
public B onInitializeNotificationPermissions(WebContext.InitializeNotificationPermissionsCallback handler) This signal is emitted when aWebKitWebContextneeds to set initial notification permissions for a web process. It is emitted when a new web process is about to be launched, and signals the most appropriate moment to use webkit_web_context_initialize_notification_permissions(). If no notification permissions have changed since the last time this signal was emitted, then there is no need to call webkit_web_context_initialize_notification_permissions() again.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.16
- See Also:
-
onInitializeWebProcessExtensions
public B onInitializeWebProcessExtensions(WebContext.InitializeWebProcessExtensionsCallback handler) This signal is emitted when a new web process is about to be launched. It signals the most appropriate moment to use webkit_web_context_set_web_process_extensions_initialization_user_data() and webkit_web_context_set_web_process_extensions_directory().- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.4
- See Also:
-
onUserMessageReceived
This signal is emitted when aWebKitUserMessageis received from a web process extension. You can reply to the message using webkit_user_message_send_reply().You can handle the user message asynchronously by calling g_object_ref() on
messageand returningtrue.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
- See Also:
-