OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 public: | 52 public: |
53 static const char* subProtocolSeperator(); | 53 static const char* subProtocolSeperator(); |
54 static PassRefPtr<WebSocket> create(ScriptExecutionContext*); | 54 static PassRefPtr<WebSocket> create(ScriptExecutionContext*); |
55 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u
rl, ExceptionCode&); | 55 static PassRefPtr<WebSocket> create(ScriptExecutionContext*, const String& u
rl, 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 String& protocol, ExceptionCode&); |
57 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&); |
58 virtual ~WebSocket(); | 58 virtual ~WebSocket(); |
59 | 59 |
60 virtual void trace(Visitor*) { } | 60 virtual void trace(Visitor*) { } |
61 | 61 |
62 virtual void visitWith(Visitor* visitor) const OVERRIDE | 62 virtual void adjustAndMark(Visitor* visitor) const OVERRIDE |
63 { | 63 { |
64 visitor->visit(this); | 64 visitor->mark(this); |
65 } | 65 } |
66 | 66 |
67 enum State { | 67 enum State { |
68 CONNECTING = 0, | 68 CONNECTING = 0, |
69 OPEN = 1, | 69 OPEN = 1, |
70 CLOSING = 2, | 70 CLOSING = 2, |
71 CLOSED = 3 | 71 CLOSED = 3 |
72 }; | 72 }; |
73 | 73 |
74 void connect(const String& url, ExceptionCode&); | 74 void connect(const String& url, ExceptionCode&); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 unsigned long m_bufferedAmount; | 153 unsigned long m_bufferedAmount; |
154 unsigned long m_bufferedAmountAfterClose; | 154 unsigned long m_bufferedAmountAfterClose; |
155 BinaryType m_binaryType; | 155 BinaryType m_binaryType; |
156 String m_subprotocol; | 156 String m_subprotocol; |
157 String m_extensions; | 157 String m_extensions; |
158 }; | 158 }; |
159 | 159 |
160 } // namespace WebCore | 160 } // namespace WebCore |
161 | 161 |
162 #endif // WebSocket_h | 162 #endif // WebSocket_h |
OLD | NEW |