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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
44 #include "wtf/text/AtomicStringHash.h" | 44 #include "wtf/text/AtomicStringHash.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class Blob; | 48 class Blob; |
49 class ExceptionState; | 49 class ExceptionState; |
50 | 50 |
51 class DOMWebSocket : public RefCountedGarbageCollectedWillBeGarbageCollectedFina
lized<DOMWebSocket>, public EventTargetWithInlineData, public ActiveDOMObject, p
ublic WebSocketChannelClient { | 51 class DOMWebSocket : public RefCountedGarbageCollectedWillBeGarbageCollectedFina
lized<DOMWebSocket>, public EventTargetWithInlineData, public ActiveDOMObject, p
ublic WebSocketChannelClient { |
52 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<D
OMWebSocket>); | 52 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<D
OMWebSocket>); |
| 53 DEFINE_WRAPPERTYPEINFO(); |
53 USING_GARBAGE_COLLECTED_MIXIN(DOMWebSocket); | 54 USING_GARBAGE_COLLECTED_MIXIN(DOMWebSocket); |
54 public: | 55 public: |
55 static const char* subprotocolSeperator(); | 56 static const char* subprotocolSeperator(); |
56 // DOMWebSocket instances must be used with a wrapper since this class's | 57 // DOMWebSocket instances must be used with a wrapper since this class's |
57 // lifetime management is designed assuming the V8 holds a ref on it while | 58 // lifetime management is designed assuming the V8 holds a ref on it while |
58 // hasPendingActivity() returns true. | 59 // hasPendingActivity() returns true. |
59 static DOMWebSocket* create(ExecutionContext*, const String& url, ExceptionS
tate&); | 60 static DOMWebSocket* create(ExecutionContext*, const String& url, ExceptionS
tate&); |
60 static DOMWebSocket* create(ExecutionContext*, const String& url, const Stri
ng& protocol, ExceptionState&); | 61 static DOMWebSocket* create(ExecutionContext*, const String& url, const Stri
ng& protocol, ExceptionState&); |
61 static DOMWebSocket* create(ExecutionContext*, const String& url, const Vect
or<String>& protocols, ExceptionState&); | 62 static DOMWebSocket* create(ExecutionContext*, const String& url, const Vect
or<String>& protocols, ExceptionState&); |
62 virtual ~DOMWebSocket(); | 63 virtual ~DOMWebSocket(); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 String m_subprotocol; | 223 String m_subprotocol; |
223 String m_extensions; | 224 String m_extensions; |
224 | 225 |
225 Member<EventQueue> m_eventQueue; | 226 Member<EventQueue> m_eventQueue; |
226 Timer<DOMWebSocket> m_bufferedAmountConsumeTimer; | 227 Timer<DOMWebSocket> m_bufferedAmountConsumeTimer; |
227 }; | 228 }; |
228 | 229 |
229 } // namespace blink | 230 } // namespace blink |
230 | 231 |
231 #endif // DOMWebSocket_h | 232 #endif // DOMWebSocket_h |
OLD | NEW |