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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 | 32 |
33 #include "modules/websockets/WebSocket.h" | 33 #include "modules/websockets/WebSocket.h" |
34 | 34 |
35 #include "bindings/v8/ExceptionMessages.h" | 35 #include "bindings/v8/ExceptionMessages.h" |
36 #include "bindings/v8/ExceptionState.h" | 36 #include "bindings/v8/ExceptionState.h" |
37 #include "bindings/v8/ScriptController.h" | 37 #include "bindings/v8/ScriptController.h" |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/events/Event.h" | 39 #include "core/dom/Event.h" |
40 #include "core/events/EventListener.h" | 40 #include "core/dom/EventListener.h" |
41 #include "core/events/EventNames.h" | 41 #include "core/dom/EventNames.h" |
42 #include "core/dom/ExceptionCode.h" | 42 #include "core/dom/ExceptionCode.h" |
43 #include "core/events/MessageEvent.h" | 43 #include "core/dom/MessageEvent.h" |
44 #include "core/dom/ScriptExecutionContext.h" | 44 #include "core/dom/ScriptExecutionContext.h" |
45 #include "core/fileapi/Blob.h" | 45 #include "core/fileapi/Blob.h" |
46 #include "core/inspector/ScriptCallStack.h" | 46 #include "core/inspector/ScriptCallStack.h" |
47 #include "core/page/ConsoleTypes.h" | 47 #include "core/page/ConsoleTypes.h" |
48 #include "core/page/ContentSecurityPolicy.h" | 48 #include "core/page/ContentSecurityPolicy.h" |
49 #include "core/page/DOMWindow.h" | 49 #include "core/page/DOMWindow.h" |
50 #include "core/page/Frame.h" | 50 #include "core/page/Frame.h" |
51 #include "core/platform/Logging.h" | 51 #include "core/platform/Logging.h" |
52 #include "core/platform/network/BlobData.h" | 52 #include "core/platform/network/BlobData.h" |
53 #include "modules/websockets/CloseEvent.h" | 53 #include "modules/websockets/CloseEvent.h" |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; | 605 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; |
606 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; | 606 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; |
607 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) | 607 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) |
608 overhead += 8; | 608 overhead += 8; |
609 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) | 609 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) |
610 overhead += 2; | 610 overhead += 2; |
611 return overhead; | 611 return overhead; |
612 } | 612 } |
613 | 613 |
614 } // namespace WebCore | 614 } // namespace WebCore |
OLD | NEW |