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

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

Issue 15232002: Make remaining modules/ objects ScriptWrappable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebSocket_h 31 #ifndef WebSocket_h
32 #define WebSocket_h 32 #define WebSocket_h
33 33
34 #include "bindings/v8/ScriptWrappable.h"
34 #include "core/dom/ActiveDOMObject.h" 35 #include "core/dom/ActiveDOMObject.h"
35 #include "core/dom/EventListener.h" 36 #include "core/dom/EventListener.h"
36 #include "core/dom/EventNames.h" 37 #include "core/dom/EventNames.h"
37 #include "core/dom/EventTarget.h" 38 #include "core/dom/EventTarget.h"
38 #include "core/platform/KURL.h" 39 #include "core/platform/KURL.h"
39 #include "modules/websockets/WebSocketChannelClient.h" 40 #include "modules/websockets/WebSocketChannelClient.h"
40 #include "wtf/Forward.h" 41 #include "wtf/Forward.h"
41 #include "wtf/OwnPtr.h" 42 #include "wtf/OwnPtr.h"
42 #include "wtf/RefCounted.h" 43 #include "wtf/RefCounted.h"
43 #include "wtf/text/AtomicStringHash.h" 44 #include "wtf/text/AtomicStringHash.h"
44 45
45 namespace WebCore { 46 namespace WebCore {
46 47
47 class Blob; 48 class Blob;
48 class WebSocketChannel; 49 class WebSocketChannel;
49 50
50 class WebSocket : public RefCounted<WebSocket>, public EventTarget, public Activ eDOMObject, public WebSocketChannelClient { 51 class WebSocket : public RefCounted<WebSocket>, public ScriptWrappable, public E ventTarget, public ActiveDOMObject, public WebSocketChannelClient {
51 public: 52 public:
52 static const char* subProtocolSeperator(); 53 static const char* subProtocolSeperator();
53 static PassRefPtr<WebSocket> create(ScriptExecutionContext*); 54 static PassRefPtr<WebSocket> create(ScriptExecutionContext*);
54 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, ExceptionCode&); 55 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, ExceptionCode&);
55 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, const String& protocol, ExceptionCode&); 56 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, const String& protocol, ExceptionCode&);
56 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, const Vector<String>& protocols, ExceptionCode&); 57 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u rl, const Vector<String>& protocols, ExceptionCode&);
57 virtual ~WebSocket(); 58 virtual ~WebSocket();
58 59
59 enum State { 60 enum State {
60 CONNECTING = 0, 61 CONNECTING = 0,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 unsigned long m_bufferedAmount; 148 unsigned long m_bufferedAmount;
148 unsigned long m_bufferedAmountAfterClose; 149 unsigned long m_bufferedAmountAfterClose;
149 BinaryType m_binaryType; 150 BinaryType m_binaryType;
150 String m_subprotocol; 151 String m_subprotocol;
151 String m_extensions; 152 String m_extensions;
152 }; 153 };
153 154
154 } // namespace WebCore 155 } // namespace WebCore
155 156
156 #endif // WebSocket_h 157 #endif // WebSocket_h
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIPort.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698