OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 class WebSocketHandshakeRequestInfo; | 55 class WebSocketHandshakeRequestInfo; |
56 class WebSocketHandshakeResponseInfo; | 56 class WebSocketHandshakeResponseInfo; |
57 | 57 |
58 } // namespace blink | 58 } // namespace blink |
59 | 59 |
60 namespace WebCore { | 60 namespace WebCore { |
61 | 61 |
62 class Document; | 62 class Document; |
63 | 63 |
64 // This class may replace MainThreadWebSocketChannel. | 64 // This class may replace MainThreadWebSocketChannel. |
65 class NewWebSocketChannelImpl : public WebSocketChannel, public RefCounted<NewWe
bSocketChannelImpl>, public blink::WebSocketHandleClient, public ContextLifecycl
eObserver { | 65 class NewWebSocketChannelImpl FINAL : public WebSocketChannel, public RefCounted
<NewWebSocketChannelImpl>, public blink::WebSocketHandleClient, public ContextLi
fecycleObserver { |
66 WTF_MAKE_FAST_ALLOCATED; | 66 WTF_MAKE_FAST_ALLOCATED; |
67 public: | 67 public: |
68 // You can specify the source file and the line number information | 68 // You can specify the source file and the line number information |
69 // explicitly by passing the last parameter. | 69 // explicitly by passing the last parameter. |
70 // In the usual case, they are set automatically and you don't have to | 70 // In the usual case, they are set automatically and you don't have to |
71 // pass it. | 71 // pass it. |
72 static PassRefPtr<NewWebSocketChannelImpl> create(ExecutionContext* context,
WebSocketChannelClient* client, const String& sourceURL = String(), unsigned li
neNumber = 0) | 72 static PassRefPtr<NewWebSocketChannelImpl> create(ExecutionContext* context,
WebSocketChannelClient* client, const String& sourceURL = String(), unsigned li
neNumber = 0) |
73 { | 73 { |
74 return adoptRef(new NewWebSocketChannelImpl(context, client, sourceURL,
lineNumber)); | 74 return adoptRef(new NewWebSocketChannelImpl(context, client, sourceURL,
lineNumber)); |
75 } | 75 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 String m_sourceURLAtConstruction; | 174 String m_sourceURLAtConstruction; |
175 unsigned m_lineNumberAtConstruction; | 175 unsigned m_lineNumberAtConstruction; |
176 | 176 |
177 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 177 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
178 }; | 178 }; |
179 | 179 |
180 } // namespace WebCore | 180 } // namespace WebCore |
181 | 181 |
182 #endif // NewWebSocketChannelImpl_h | 182 #endif // NewWebSocketChannelImpl_h |
OLD | NEW |