blob: 92865206902e0204447ab7ea2e819050d7a7b641 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
enum PresentationConnectionState {
] interface PresentationConnection : EventTarget {
readonly attribute USVString id;
readonly attribute USVString url;
readonly attribute PresentationConnectionState state;
[MeasureAs=PresentationConnectionClose] void close();
[MeasureAs=PresentationConnectionTerminate] void terminate();
attribute EventHandler onconnect;
attribute EventHandler onclose;
attribute EventHandler onterminate;
// Communication
attribute BinaryType binaryType;
attribute EventHandler onmessage;
[RaisesException, MeasureAs=PresentationConnectionSend] void send(DOMString message);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(Blob data);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(ArrayBuffer data);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(ArrayBufferView data);