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 30 matching lines...) Expand all Loading... |
41 #include "modules/websockets/WebSocketChannel.h" | 41 #include "modules/websockets/WebSocketChannel.h" |
42 #include "modules/websockets/WebSocketChannelClient.h" | 42 #include "modules/websockets/WebSocketChannelClient.h" |
43 #include "platform/Timer.h" | 43 #include "platform/Timer.h" |
44 #include "platform/heap/Handle.h" | 44 #include "platform/heap/Handle.h" |
45 #include "platform/weborigin/KURL.h" | 45 #include "platform/weborigin/KURL.h" |
46 #include "wtf/Deque.h" | 46 #include "wtf/Deque.h" |
47 #include "wtf/Forward.h" | 47 #include "wtf/Forward.h" |
48 #include "wtf/PassRefPtr.h" | 48 #include "wtf/PassRefPtr.h" |
49 #include "wtf/RefPtr.h" | 49 #include "wtf/RefPtr.h" |
50 #include "wtf/text/WTFString.h" | 50 #include "wtf/text/WTFString.h" |
51 #include <memory> | |
52 #include <stdint.h> | 51 #include <stdint.h> |
53 | 52 |
54 namespace blink { | 53 namespace blink { |
55 | 54 |
56 class Blob; | 55 class Blob; |
57 class DOMArrayBuffer; | 56 class DOMArrayBuffer; |
58 class DOMArrayBufferView; | 57 class DOMArrayBufferView; |
59 class ExceptionState; | 58 class ExceptionState; |
60 class ExecutionContext; | 59 class ExecutionContext; |
61 class StringOrStringSequence; | 60 class StringOrStringSequence; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void stop() override; | 120 void stop() override; |
122 | 121 |
123 // ActiveScriptWrappable | 122 // ActiveScriptWrappable |
124 // Prevent this instance from being collected while it's not in CLOSED | 123 // Prevent this instance from being collected while it's not in CLOSED |
125 // state. | 124 // state. |
126 bool hasPendingActivity() const final; | 125 bool hasPendingActivity() const final; |
127 | 126 |
128 // WebSocketChannelClient functions. | 127 // WebSocketChannelClient functions. |
129 void didConnect(const String& subprotocol, const String& extensions) overrid
e; | 128 void didConnect(const String& subprotocol, const String& extensions) overrid
e; |
130 void didReceiveTextMessage(const String& message) override; | 129 void didReceiveTextMessage(const String& message) override; |
131 void didReceiveBinaryMessage(std::unique_ptr<Vector<char>>) override; | 130 void didReceiveBinaryMessage(PassOwnPtr<Vector<char>>) override; |
132 void didError() override; | 131 void didError() override; |
133 void didConsumeBufferedAmount(uint64_t) override; | 132 void didConsumeBufferedAmount(uint64_t) override; |
134 void didStartClosingHandshake() override; | 133 void didStartClosingHandshake() override; |
135 void didClose(ClosingHandshakeCompletionStatus, unsigned short code, const S
tring& reason) override; | 134 void didClose(ClosingHandshakeCompletionStatus, unsigned short code, const S
tring& reason) override; |
136 | 135 |
137 DECLARE_VIRTUAL_TRACE(); | 136 DECLARE_VIRTUAL_TRACE(); |
138 | 137 |
139 static bool isValidSubprotocolString(const String&); | 138 static bool isValidSubprotocolString(const String&); |
140 | 139 |
141 protected: | 140 protected: |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 String m_subprotocol; | 241 String m_subprotocol; |
243 String m_extensions; | 242 String m_extensions; |
244 | 243 |
245 Member<EventQueue> m_eventQueue; | 244 Member<EventQueue> m_eventQueue; |
246 Timer<DOMWebSocket> m_bufferedAmountConsumeTimer; | 245 Timer<DOMWebSocket> m_bufferedAmountConsumeTimer; |
247 }; | 246 }; |
248 | 247 |
249 } // namespace blink | 248 } // namespace blink |
250 | 249 |
251 #endif // DOMWebSocket_h | 250 #endif // DOMWebSocket_h |
OLD | NEW |