Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: Source/modules/websockets/WebSocket.idl

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/webmidi/MIDIPort.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2010, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 [ 32 [
33 GlobalContext=Window&WorkerGlobalScope, 33 GlobalContext=Window&WorkerGlobalScope,
34 ActiveDOMObject, 34 ActiveDOMObject,
35 Constructor(DOMString url), 35 Constructor(DOMString url),
36 Constructor(DOMString url, sequence<DOMString> protocols), 36 Constructor(DOMString url, sequence<DOMString> protocols),
37 Constructor(DOMString url, DOMString protocol), 37 Constructor(DOMString url, DOMString protocol),
38 ConstructorRaisesException, 38 ConstructorRaisesException,
39 ConstructorCallWith=ScriptExecutionContext, 39 ConstructorCallWith=ScriptExecutionContext
40 EventTarget 40 ] interface WebSocket : EventTarget {
41 ] interface WebSocket {
42 readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons. 41 readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
43 readonly attribute DOMString url; 42 readonly attribute DOMString url;
44 43
45 // ready state 44 // ready state
46 const unsigned short CONNECTING = 0; 45 const unsigned short CONNECTING = 0;
47 const unsigned short OPEN = 1; 46 const unsigned short OPEN = 1;
48 const unsigned short CLOSING = 2; 47 const unsigned short CLOSING = 2;
49 const unsigned short CLOSED = 3; 48 const unsigned short CLOSED = 3;
50 readonly attribute unsigned short readyState; 49 readonly attribute unsigned short readyState;
51 50
52 readonly attribute unsigned long bufferedAmount; 51 readonly attribute unsigned long bufferedAmount;
53 52
54 // networking 53 // networking
55 attribute EventListener onopen; 54 attribute EventListener onopen;
56 attribute EventListener onmessage; 55 attribute EventListener onmessage;
57 attribute EventListener onerror; 56 attribute EventListener onerror;
58 attribute EventListener onclose; 57 attribute EventListener onclose;
59 58
60 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol; 59 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol;
61 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extension s; 60 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extension s;
62 61
63 attribute DOMString binaryType; 62 attribute DOMString binaryType;
64 63
65 [RaisesException] void send(ArrayBuffer data); 64 [RaisesException] void send(ArrayBuffer data);
66 [RaisesException] void send(ArrayBufferView data); 65 [RaisesException] void send(ArrayBufferView data);
67 [RaisesException] void send(Blob data); 66 [RaisesException] void send(Blob data);
68 [RaisesException] void send(DOMString data); 67 [RaisesException] void send(DOMString data);
69 68
70 [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason); 69 [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason);
71
72 // EventTarget interface
73 void addEventListener(DOMString type,
74 EventListener listener,
75 optional boolean useCapture);
76 void removeEventListener(DOMString type,
77 EventListener listener,
78 optional boolean useCapture);
79 [RaisesException] boolean dispatchEvent(Event evt);
80 }; 70 };
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIPort.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698