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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "platform/network/ResourceResponse.h" | 54 #include "platform/network/ResourceResponse.h" |
55 #include "platform/weborigin/SecurityOrigin.h" | 55 #include "platform/weborigin/SecurityOrigin.h" |
56 #include "public/platform/WebURLRequest.h" | 56 #include "public/platform/WebURLRequest.h" |
57 #include "wtf/text/StringBuilder.h" | 57 #include "wtf/text/StringBuilder.h" |
58 | 58 |
59 namespace blink { | 59 namespace blink { |
60 | 60 |
61 const unsigned long long EventSource::defaultReconnectDelay = 3000; | 61 const unsigned long long EventSource::defaultReconnectDelay = 3000; |
62 | 62 |
63 inline EventSource::EventSource(ExecutionContext* context, const KURL& url, cons
t EventSourceInit& eventSourceInit) | 63 inline EventSource::EventSource(ExecutionContext* context, const KURL& url, cons
t EventSourceInit& eventSourceInit) |
64 : ActiveDOMObject(context) | 64 : ActiveScriptWrappable(this) |
| 65 , ActiveDOMObject(context) |
65 , m_url(url) | 66 , m_url(url) |
66 , m_withCredentials(eventSourceInit.withCredentials()) | 67 , m_withCredentials(eventSourceInit.withCredentials()) |
67 , m_state(CONNECTING) | 68 , m_state(CONNECTING) |
68 , m_connectTimer(this, &EventSource::connectTimerFired) | 69 , m_connectTimer(this, &EventSource::connectTimerFired) |
69 , m_reconnectDelay(defaultReconnectDelay) | 70 , m_reconnectDelay(defaultReconnectDelay) |
70 { | 71 { |
71 } | 72 } |
72 | 73 |
73 EventSource* EventSource::create(ExecutionContext* context, const String& url, c
onst EventSourceInit& eventSourceInit, ExceptionState& exceptionState) | 74 EventSource* EventSource::create(ExecutionContext* context, const String& url, c
onst EventSourceInit& eventSourceInit, ExceptionState& exceptionState) |
74 { | 75 { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 350 |
350 DEFINE_TRACE(EventSource) | 351 DEFINE_TRACE(EventSource) |
351 { | 352 { |
352 visitor->trace(m_parser); | 353 visitor->trace(m_parser); |
353 RefCountedGarbageCollectedEventTargetWithInlineData::trace(visitor); | 354 RefCountedGarbageCollectedEventTargetWithInlineData::trace(visitor); |
354 ActiveDOMObject::trace(visitor); | 355 ActiveDOMObject::trace(visitor); |
355 EventSourceParser::Client::trace(visitor); | 356 EventSourceParser::Client::trace(visitor); |
356 } | 357 } |
357 | 358 |
358 } // namespace blink | 359 } // namespace blink |
OLD | NEW |