| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 class Document; | 56 class Document; |
| 57 class WebSocketHandshakeRequest; | 57 class WebSocketHandshakeRequest; |
| 58 class WebSocketHandshakeRequestInfo; | 58 class WebSocketHandshakeRequestInfo; |
| 59 class WebSocketHandshakeResponseInfo; | 59 class WebSocketHandshakeResponseInfo; |
| 60 | 60 |
| 61 // This class is a WebSocketChannel subclass that works with a Document in a | 61 // This class is a WebSocketChannel subclass that works with a Document in a |
| 62 // DOMWindow (i.e. works in the main thread). | 62 // DOMWindow (i.e. works in the main thread). |
| 63 class MODULES_EXPORT DocumentWebSocketChannel final : public WebSocketChannel, p
ublic WebSocketHandleClient, public ContextLifecycleObserver { | 63 class MODULES_EXPORT DocumentWebSocketChannel final : public WebSocketChannel, p
ublic WebSocketHandleClient, public ContextLifecycleObserver { |
| 64 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DocumentWebSocketChannel); | 64 USING_GARBAGE_COLLECTED_MIXIN(DocumentWebSocketChannel); |
| 65 public: | 65 public: |
| 66 // You can specify the source file and the line number information | 66 // You can specify the source file and the line number information |
| 67 // explicitly by passing the last parameter. | 67 // explicitly by passing the last parameter. |
| 68 // In the usual case, they are set automatically and you don't have to | 68 // In the usual case, they are set automatically and you don't have to |
| 69 // pass it. | 69 // pass it. |
| 70 // Specify handle explicitly only in tests. | 70 // Specify handle explicitly only in tests. |
| 71 static DocumentWebSocketChannel* create(Document* document, WebSocketChannel
Client* client, const String& sourceURL = String(), unsigned lineNumber = 0, Web
SocketHandle *handle = 0) | 71 static DocumentWebSocketChannel* create(Document* document, WebSocketChannel
Client* client, const String& sourceURL = String(), unsigned lineNumber = 0, Web
SocketHandle *handle = 0) |
| 72 { | 72 { |
| 73 return new DocumentWebSocketChannel(document, client, sourceURL, lineNum
ber, handle); | 73 return new DocumentWebSocketChannel(document, client, sourceURL, lineNum
ber, handle); |
| 74 } | 74 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 String m_sourceURLAtConstruction; | 170 String m_sourceURLAtConstruction; |
| 171 unsigned m_lineNumberAtConstruction; | 171 unsigned m_lineNumberAtConstruction; |
| 172 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 172 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
| 173 | 173 |
| 174 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 174 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace blink | 177 } // namespace blink |
| 178 | 178 |
| 179 #endif // DocumentWebSocketChannel_h | 179 #endif // DocumentWebSocketChannel_h |
| OLD | NEW |