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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "core/events/MessageEvent.h" | 42 #include "core/events/MessageEvent.h" |
43 #include "core/fileapi/Blob.h" | 43 #include "core/fileapi/Blob.h" |
44 #include "core/frame/ConsoleTypes.h" | 44 #include "core/frame/ConsoleTypes.h" |
45 #include "core/frame/ContentSecurityPolicy.h" | 45 #include "core/frame/ContentSecurityPolicy.h" |
46 #include "core/frame/DOMWindow.h" | 46 #include "core/frame/DOMWindow.h" |
47 #include "core/frame/Frame.h" | 47 #include "core/frame/Frame.h" |
48 #include "core/inspector/ScriptCallStack.h" | 48 #include "core/inspector/ScriptCallStack.h" |
49 #include "modules/websockets/CloseEvent.h" | 49 #include "modules/websockets/CloseEvent.h" |
50 #include "platform/Logging.h" | 50 #include "platform/Logging.h" |
51 #include "platform/blob/BlobData.h" | 51 #include "platform/blob/BlobData.h" |
52 #include "weborigin/KnownPorts.h" | 52 #include "platform/weborigin/KnownPorts.h" |
53 #include "weborigin/SecurityOrigin.h" | 53 #include "platform/weborigin/SecurityOrigin.h" |
54 #include "wtf/ArrayBuffer.h" | 54 #include "wtf/ArrayBuffer.h" |
55 #include "wtf/ArrayBufferView.h" | 55 #include "wtf/ArrayBufferView.h" |
56 #include "wtf/HashSet.h" | 56 #include "wtf/HashSet.h" |
57 #include "wtf/PassOwnPtr.h" | 57 #include "wtf/PassOwnPtr.h" |
58 #include "wtf/StdLibExtras.h" | 58 #include "wtf/StdLibExtras.h" |
59 #include "wtf/text/CString.h" | 59 #include "wtf/text/CString.h" |
60 #include "wtf/text/StringBuilder.h" | 60 #include "wtf/text/StringBuilder.h" |
61 #include "wtf/text/WTFString.h" | 61 #include "wtf/text/WTFString.h" |
62 | 62 |
63 using namespace std; | 63 using namespace std; |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; | 674 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; |
675 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; | 675 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; |
676 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) | 676 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) |
677 overhead += 8; | 677 overhead += 8; |
678 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) | 678 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) |
679 overhead += 2; | 679 overhead += 2; |
680 return overhead; | 680 return overhead; |
681 } | 681 } |
682 | 682 |
683 } // namespace WebCore | 683 } // namespace WebCore |
OLD | NEW |