nativemessagingtransport.js
No description.

File Location

/goog/net/xpc/nativemessagingtransport.js

Classes

goog.net.xpc.NativeMessagingTransport
The native messaging transport Uses document.postMessage() to send messages to other documents. Receiving is done by listening on 'message'-events on the document.

Public Protected Private

Global Functions

goog.net.xpc.NativeMessagingTransport.initialize_(listenWindow)
Initializes this transport. Registers a listener for 'message'-events on the document.
Arguments:
listenWindow : Window
The window to listen to events on.
code »
goog.net.xpc.NativeMessagingTransport.messageReceived_(msgEvt) boolean
Processes an incoming message-event.
Arguments:
msgEvt : goog.events.BrowserEvent
The message event.
Returns: boolean  True if message was successfully delivered to a channel.
code »
goog.net.xpc.NativeMessagingTransport.parseTransportPayload_(payload) !Array.<?string>
Parse a transport service payload message. For v1, it is simply expected to be 'SETUP' or 'SETUP_ACK'. For v2, an example setup message is 'SETUP_NTPV2,abc123', where the second part is the endpoint id. The v2 setup ack message is simply 'SETUP_ACK_NTPV2'.
Arguments:
payload : string
The payload.
Returns: !Array.<?string>  An array with the message type as the first member and the endpoint id as the second, if one was sent, or null otherwise.
code »

Directory xpc

File Reference