OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "modules/websockets/MainThreadWebSocketChannel.h" | 32 #include "modules/websockets/MainThreadWebSocketChannel.h" |
33 | 33 |
34 #include "bindings/v8/ExceptionStatePlaceholder.h" | 34 #include "bindings/v8/ExceptionStatePlaceholder.h" |
35 #include "bindings/v8/ScriptCallStackFactory.h" | 35 #include "bindings/v8/ScriptCallStackFactory.h" |
36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
37 #include "core/dom/ExecutionContext.h" | 37 #include "core/dom/ExecutionContext.h" |
38 #include "core/fileapi/Blob.h" | 38 #include "core/fileapi/Blob.h" |
39 #include "core/fileapi/FileError.h" | |
40 #include "core/fileapi/FileReaderLoader.h" | 39 #include "core/fileapi/FileReaderLoader.h" |
41 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" |
42 #include "core/inspector/ScriptCallStack.h" | 41 #include "core/inspector/ScriptCallStack.h" |
43 #include "core/loader/CookieJar.h" | 42 #include "core/loader/CookieJar.h" |
44 #include "core/loader/FrameLoader.h" | 43 #include "core/loader/FrameLoader.h" |
45 #include "core/loader/FrameLoaderClient.h" | 44 #include "core/loader/FrameLoaderClient.h" |
46 #include "core/loader/UniqueIdentifier.h" | 45 #include "core/loader/UniqueIdentifier.h" |
47 #include "core/frame/Frame.h" | 46 #include "core/frame/Frame.h" |
48 #include "core/page/Page.h" | 47 #include "core/page/Page.h" |
49 #include "modules/websockets/WebSocketChannel.h" | |
50 #include "modules/websockets/WebSocketChannelClient.h" | 48 #include "modules/websockets/WebSocketChannelClient.h" |
51 #include "modules/websockets/WebSocketHandshake.h" | |
52 #include "platform/Logging.h" | 49 #include "platform/Logging.h" |
53 #include "platform/network/SocketStreamError.h" | 50 #include "platform/network/SocketStreamError.h" |
54 #include "platform/network/SocketStreamHandle.h" | 51 #include "platform/network/SocketStreamHandle.h" |
55 #include "wtf/ArrayBuffer.h" | 52 #include "wtf/ArrayBuffer.h" |
56 #include "wtf/Deque.h" | |
57 #include "wtf/FastMalloc.h" | 53 #include "wtf/FastMalloc.h" |
58 #include "wtf/HashMap.h" | 54 #include "wtf/HashMap.h" |
59 #include "wtf/OwnPtr.h" | 55 #include "wtf/OwnPtr.h" |
60 #include "wtf/PassOwnPtr.h" | |
61 #include "wtf/text/CString.h" | |
62 #include "wtf/text/StringHash.h" | 56 #include "wtf/text/StringHash.h" |
63 #include "wtf/text/WTFString.h" | 57 #include "wtf/text/WTFString.h" |
64 | 58 |
65 using namespace std; | 59 using namespace std; |
66 | 60 |
67 namespace WebCore { | 61 namespace WebCore { |
68 | 62 |
69 const double TCPMaximumSegmentLifetime = 2 * 60.0; | 63 const double TCPMaximumSegmentLifetime = 2 * 60.0; |
70 | 64 |
71 MainThreadWebSocketChannel::MainThreadWebSocketChannel(Document* document, WebSo
cketChannelClient* client, const String& sourceURL, unsigned lineNumber) | 65 MainThreadWebSocketChannel::MainThreadWebSocketChannel(Document* document, WebSo
cketChannelClient* client, const String& sourceURL, unsigned lineNumber) |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 } | 800 } |
807 | 801 |
808 Vector<char> frameData; | 802 Vector<char> frameData; |
809 frame.makeFrameData(frameData); | 803 frame.makeFrameData(frameData); |
810 | 804 |
811 m_perMessageDeflate.resetDeflateBuffer(); | 805 m_perMessageDeflate.resetDeflateBuffer(); |
812 return m_handle->send(frameData.data(), frameData.size()); | 806 return m_handle->send(frameData.data(), frameData.size()); |
813 } | 807 } |
814 | 808 |
815 } // namespace WebCore | 809 } // namespace WebCore |
OLD | NEW |