| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. | 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 #include "modules/eventsource/EventSource.h" | 33 #include "modules/eventsource/EventSource.h" |
| 34 | 34 |
| 35 #include <memory> |
| 35 #include "bindings/core/v8/ExceptionState.h" | 36 #include "bindings/core/v8/ExceptionState.h" |
| 36 #include "bindings/core/v8/ScriptController.h" | 37 #include "bindings/core/v8/ScriptController.h" |
| 37 #include "bindings/core/v8/SerializedScriptValue.h" | 38 #include "bindings/core/v8/SerializedScriptValue.h" |
| 38 #include "bindings/core/v8/SerializedScriptValueFactory.h" | 39 #include "bindings/core/v8/SerializedScriptValueFactory.h" |
| 39 #include "core/dom/Document.h" | 40 #include "core/dom/Document.h" |
| 40 #include "core/dom/ExceptionCode.h" | 41 #include "core/dom/ExceptionCode.h" |
| 41 #include "core/dom/ExecutionContext.h" | 42 #include "core/dom/ExecutionContext.h" |
| 42 #include "core/dom/TaskRunnerHelper.h" | 43 #include "core/dom/TaskRunnerHelper.h" |
| 43 #include "core/events/Event.h" | 44 #include "core/events/Event.h" |
| 44 #include "core/events/MessageEvent.h" | 45 #include "core/events/MessageEvent.h" |
| 45 #include "core/frame/LocalDOMWindow.h" | 46 #include "core/frame/LocalDOMWindow.h" |
| 46 #include "core/frame/LocalFrame.h" | 47 #include "core/frame/LocalFrame.h" |
| 47 #include "core/frame/UseCounter.h" | 48 #include "core/frame/UseCounter.h" |
| 48 #include "core/frame/csp/ContentSecurityPolicy.h" | 49 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 49 #include "core/inspector/ConsoleMessage.h" | 50 #include "core/inspector/ConsoleMessage.h" |
| 50 #include "core/inspector/InspectorInstrumentation.h" | 51 #include "core/inspector/InspectorInstrumentation.h" |
| 51 #include "core/loader/ThreadableLoader.h" | 52 #include "core/loader/ThreadableLoader.h" |
| 52 #include "modules/eventsource/EventSourceInit.h" | 53 #include "modules/eventsource/EventSourceInit.h" |
| 53 #include "platform/HTTPNames.h" | 54 #include "platform/HTTPNames.h" |
| 54 #include "platform/network/ResourceError.h" | 55 #include "platform/network/ResourceError.h" |
| 55 #include "platform/network/ResourceRequest.h" | 56 #include "platform/network/ResourceRequest.h" |
| 56 #include "platform/network/ResourceResponse.h" | 57 #include "platform/network/ResourceResponse.h" |
| 57 #include "platform/weborigin/SecurityOrigin.h" | 58 #include "platform/weborigin/SecurityOrigin.h" |
| 58 #include "public/platform/WebURLRequest.h" | 59 #include "public/platform/WebURLRequest.h" |
| 59 #include "wtf/text/StringBuilder.h" | 60 #include "wtf/text/StringBuilder.h" |
| 60 #include <memory> | |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 const unsigned long long EventSource::defaultReconnectDelay = 3000; | 64 const unsigned long long EventSource::defaultReconnectDelay = 3000; |
| 65 | 65 |
| 66 inline EventSource::EventSource(ExecutionContext* context, | 66 inline EventSource::EventSource(ExecutionContext* context, |
| 67 const KURL& url, | 67 const KURL& url, |
| 68 const EventSourceInit& eventSourceInit) | 68 const EventSourceInit& eventSourceInit) |
| 69 : ContextLifecycleObserver(context), | 69 : ContextLifecycleObserver(context), |
| 70 m_url(url), | 70 m_url(url), |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 DEFINE_TRACE(EventSource) { | 384 DEFINE_TRACE(EventSource) { |
| 385 visitor->trace(m_parser); | 385 visitor->trace(m_parser); |
| 386 visitor->trace(m_loader); | 386 visitor->trace(m_loader); |
| 387 EventTargetWithInlineData::trace(visitor); | 387 EventTargetWithInlineData::trace(visitor); |
| 388 ContextLifecycleObserver::trace(visitor); | 388 ContextLifecycleObserver::trace(visitor); |
| 389 EventSourceParser::Client::trace(visitor); | 389 EventSourceParser::Client::trace(visitor); |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace blink | 392 } // namespace blink |
| OLD | NEW |