WebKit2WebExtension.UserMessage

g GObject.InitiallyUnowned GObject.InitiallyUnowned WebKit2WebExtension.UserMessage WebKit2WebExtension.UserMessage GObject.InitiallyUnowned->WebKit2WebExtension.UserMessage GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

class

new (name, parameters)

class

new_with_fd_list (name, parameters, fd_list)

get_fd_list ()

get_name ()

get_parameters ()

send_reply (reply)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

fd-list

Gio.UnixFDList

r/w/co

name

str

r/w/co

parameters

GLib.Variant

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.InitiallyUnowned

r

Class Details

class WebKit2WebExtension.UserMessage(**kwargs)
Bases:

GObject.InitiallyUnowned

Abstract:

No

Structure:

WebKit2WebExtension.UserMessageClass

Message that can be sent between the UI process and web process extensions.

A WebKit2WebExtension.UserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKit2WebExtension.UserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a #WebKitWebContext to all web process extensions, from a web process extension to its corresponding #WebKitWebContext, and from a #WebKitWebView to its corresponding WebKit2WebExtension.WebPage (and vice versa). One to one messages can be replied to directly with WebKit2WebExtension.UserMessage.send_reply().

New in version 2.28.

classmethod error_quark()
Returns:

user message error domain.

Return type:

int

Gets the quark for the domain of user message errors.

classmethod new(name, parameters)
Parameters:
Returns:

the newly created WebKit2WebExtension.UserMessage object.

Return type:

WebKit2WebExtension.UserMessage

Create a new WebKit2WebExtension.UserMessage with name.

New in version 2.28.

classmethod new_with_fd_list(name, parameters, fd_list)
Parameters:
Returns:

the newly created WebKit2WebExtension.UserMessage object.

Return type:

WebKit2WebExtension.UserMessage

Create a new WebKit2WebExtension.UserMessage including also a list of UNIX file descriptors to be sent.

New in version 2.28.

get_fd_list()
Returns:

the message list of file descriptors

Return type:

Gio.UnixFDList or None

Get the self list of file descritpor.

New in version 2.28.

get_name()
Returns:

the message name

Return type:

str

Get the self name.

New in version 2.28.

get_parameters()
Returns:

the message parameters

Return type:

GLib.Variant or None

Get the self parameters.

New in version 2.28.

send_reply(reply)
Parameters:

reply (WebKit2WebExtension.UserMessage) – a WebKit2WebExtension.UserMessage to send as reply

Send a reply to an user message.

If reply is floating, it’s consumed. You can only send a reply to a WebKit2WebExtension.UserMessage that has been received.

New in version 2.28.

Property Details

WebKit2WebExtension.UserMessage.props.fd_list
Name:

fd-list

Type:

Gio.UnixFDList

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The UNIX file descriptors of the user message.

New in version 2.28.

WebKit2WebExtension.UserMessage.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of the user message.

New in version 2.28.

WebKit2WebExtension.UserMessage.props.parameters
Name:

parameters

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The parameters of the user message as a GLib.Variant, or None if the message doesn’t include parameters. Note that only complete types are allowed.

New in version 2.28.