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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "modules/websockets/NewWebSocketChannelImpl.h" | 32 #include "modules/websockets/NewWebSocketChannelImpl.h" |
33 | 33 |
34 #include "bindings/v8/ScriptCallStackFactory.h" | 34 #include "bindings/v8/ScriptCallStackFactory.h" |
35 #include "core/dom/ContextLifecycleObserver.h" | |
36 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
37 #include "core/dom/ExecutionContext.h" | 36 #include "core/dom/ExecutionContext.h" |
38 #include "core/fileapi/Blob.h" | |
39 #include "core/fileapi/FileError.h" | |
40 #include "core/fileapi/FileReaderLoader.h" | 37 #include "core/fileapi/FileReaderLoader.h" |
41 #include "core/fileapi/FileReaderLoaderClient.h" | 38 #include "core/fileapi/FileReaderLoaderClient.h" |
42 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
43 #include "core/inspector/ScriptCallStack.h" | 40 #include "core/inspector/ScriptCallStack.h" |
44 #include "core/loader/UniqueIdentifier.h" | 41 #include "core/loader/UniqueIdentifier.h" |
45 #include "modules/websockets/WebSocketChannel.h" | |
46 #include "modules/websockets/WebSocketChannelClient.h" | 42 #include "modules/websockets/WebSocketChannelClient.h" |
47 #include "platform/Logging.h" | 43 #include "platform/Logging.h" |
48 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
49 #include "public/platform/WebSocketHandle.h" | |
50 #include "public/platform/WebString.h" | 45 #include "public/platform/WebString.h" |
51 #include "public/platform/WebURL.h" | 46 #include "public/platform/WebURL.h" |
52 #include "public/platform/WebVector.h" | 47 #include "public/platform/WebVector.h" |
53 #include "weborigin/SecurityOrigin.h" | 48 #include "weborigin/SecurityOrigin.h" |
54 #include "wtf/ArrayBuffer.h" | |
55 #include "wtf/Vector.h" | |
56 #include "wtf/text/WTFString.h" | |
57 | 49 |
58 using blink::WebSocketHandle; | 50 using blink::WebSocketHandle; |
59 | 51 |
60 namespace WebCore { | 52 namespace WebCore { |
61 | 53 |
62 namespace { | 54 namespace { |
63 | 55 |
64 bool isClean(int code) | 56 bool isClean(int code) |
65 { | 57 { |
66 return code == WebSocketChannel::CloseEventCodeNormalClosure | 58 return code == WebSocketChannel::CloseEventCodeNormalClosure |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 if (errorCode == FileError::ABORT_ERR) { | 485 if (errorCode == FileError::ABORT_ERR) { |
494 // The error is caused by cancel(). | 486 // The error is caused by cancel(). |
495 return; | 487 return; |
496 } | 488 } |
497 // FIXME: Generate human-friendly reason message. | 489 // FIXME: Generate human-friendly reason message. |
498 failAsError("Failed to load Blob: error code = " + String::number(errorCode)
); | 490 failAsError("Failed to load Blob: error code = " + String::number(errorCode)
); |
499 // |this| can be deleted here. | 491 // |this| can be deleted here. |
500 } | 492 } |
501 | 493 |
502 } // namespace WebCore | 494 } // namespace WebCore |
OLD | NEW |