goog.net.xpc.NativeMessagingTransport
Classgoog.net.xpc.NativeMessagingTransport
> goog.net.xpc.Transport
> goog.Disposable
goog.net.xpc.NativeMessagingTransport(channel, peerHostname, opt_domHelper, opt_oneSidedHandshake,
opt_protocolVersion)
The native messaging transport Uses document.postMessage() to send messages to other documents. Receiving is done by listening on 'message'-events on the document.
channel
{goog.net.xpc.CrossPageChannel
}
peerHostname
{string
}
opt_domHelper
{goog.dom.DomHelper
=}
opt_oneSidedHandshake
{boolean
=}
opt_protocolVersion
{number
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.connect()
Connects this transport.
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getName()
Inherited from goog.net.xpc.Transport
.
Return the transport name.
string
}
.getType()
Inherited from goog.net.xpc.Transport
.
number
}
.getWindow()
Inherited from goog.net.xpc.Transport
.
Returns the window associated with this transport instance.
Window
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.send(service, payload)
Sends a message.
service
{string
}
payload
{string
}
.transportServiceHandler(payload)
Handles transport service messages.
payload
{string
}
.transportType
[protected] {number
}The transport type.