| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "wtf/text/StringBuilder.h" | 58 #include "wtf/text/StringBuilder.h" |
| 59 #include <memory> | 59 #include <memory> |
| 60 | 60 |
| 61 namespace blink { | 61 namespace blink { |
| 62 | 62 |
| 63 const unsigned long long EventSource::defaultReconnectDelay = 3000; | 63 const unsigned long long EventSource::defaultReconnectDelay = 3000; |
| 64 | 64 |
| 65 inline EventSource::EventSource(ExecutionContext* context, | 65 inline EventSource::EventSource(ExecutionContext* context, |
| 66 const KURL& url, | 66 const KURL& url, |
| 67 const EventSourceInit& eventSourceInit) | 67 const EventSourceInit& eventSourceInit) |
| 68 : ActiveScriptWrappable<EventSource>(this), | 68 : SuspendableObject(context), |
| 69 SuspendableObject(context), | |
| 70 m_url(url), | 69 m_url(url), |
| 71 m_currentURL(url), | 70 m_currentURL(url), |
| 72 m_withCredentials(eventSourceInit.withCredentials()), | 71 m_withCredentials(eventSourceInit.withCredentials()), |
| 73 m_state(kConnecting), | 72 m_state(kConnecting), |
| 74 m_connectTimer(this, &EventSource::connectTimerFired), | 73 m_connectTimer(this, &EventSource::connectTimerFired), |
| 75 m_reconnectDelay(defaultReconnectDelay) {} | 74 m_reconnectDelay(defaultReconnectDelay) {} |
| 76 | 75 |
| 77 EventSource* EventSource::create(ExecutionContext* context, | 76 EventSource* EventSource::create(ExecutionContext* context, |
| 78 const String& url, | 77 const String& url, |
| 79 const EventSourceInit& eventSourceInit, | 78 const EventSourceInit& eventSourceInit, |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 377 |
| 379 DEFINE_TRACE(EventSource) { | 378 DEFINE_TRACE(EventSource) { |
| 380 visitor->trace(m_parser); | 379 visitor->trace(m_parser); |
| 381 visitor->trace(m_loader); | 380 visitor->trace(m_loader); |
| 382 EventTargetWithInlineData::trace(visitor); | 381 EventTargetWithInlineData::trace(visitor); |
| 383 SuspendableObject::trace(visitor); | 382 SuspendableObject::trace(visitor); |
| 384 EventSourceParser::Client::trace(visitor); | 383 EventSourceParser::Client::trace(visitor); |
| 385 } | 384 } |
| 386 | 385 |
| 387 } // namespace blink | 386 } // namespace blink |
| OLD | NEW |