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(this), | 68 : ActiveScriptWrappable<EventSource>(this), |
69 SuspendableObject(context), | 69 SuspendableObject(context), |
70 m_url(url), | 70 m_url(url), |
71 m_currentURL(url), | 71 m_currentURL(url), |
72 m_withCredentials(eventSourceInit.withCredentials()), | 72 m_withCredentials(eventSourceInit.withCredentials()), |
73 m_state(kConnecting), | 73 m_state(kConnecting), |
74 m_connectTimer(this, &EventSource::connectTimerFired), | 74 m_connectTimer(this, &EventSource::connectTimerFired), |
75 m_reconnectDelay(defaultReconnectDelay) {} | 75 m_reconnectDelay(defaultReconnectDelay) {} |
76 | 76 |
77 EventSource* EventSource::create(ExecutionContext* context, | 77 EventSource* EventSource::create(ExecutionContext* context, |
78 const String& url, | 78 const String& url, |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 378 |
379 DEFINE_TRACE(EventSource) { | 379 DEFINE_TRACE(EventSource) { |
380 visitor->trace(m_parser); | 380 visitor->trace(m_parser); |
381 visitor->trace(m_loader); | 381 visitor->trace(m_loader); |
382 EventTargetWithInlineData::trace(visitor); | 382 EventTargetWithInlineData::trace(visitor); |
383 SuspendableObject::trace(visitor); | 383 SuspendableObject::trace(visitor); |
384 EventSourceParser::Client::trace(visitor); | 384 EventSourceParser::Client::trace(visitor); |
385 } | 385 } |
386 | 386 |
387 } // namespace blink | 387 } // namespace blink |
OLD | NEW |