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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 { | 105 { |
106 ASSERT(m_state == CLOSED); | 106 ASSERT(m_state == CLOSED); |
107 ASSERT(!m_requestInFlight); | 107 ASSERT(!m_requestInFlight); |
108 } | 108 } |
109 | 109 |
110 void EventSource::scheduleInitialConnect() | 110 void EventSource::scheduleInitialConnect() |
111 { | 111 { |
112 ASSERT(m_state == CONNECTING); | 112 ASSERT(m_state == CONNECTING); |
113 ASSERT(!m_requestInFlight); | 113 ASSERT(!m_requestInFlight); |
114 | 114 |
115 m_connectTimer.startOneShot(0, FROM_HERE); | 115 m_connectTimer.startOneShot(0, BLINK_FROM_HERE); |
116 } | 116 } |
117 | 117 |
118 void EventSource::connect() | 118 void EventSource::connect() |
119 { | 119 { |
120 ASSERT(m_state == CONNECTING); | 120 ASSERT(m_state == CONNECTING); |
121 ASSERT(!m_requestInFlight); | 121 ASSERT(!m_requestInFlight); |
122 ASSERT(executionContext()); | 122 ASSERT(executionContext()); |
123 | 123 |
124 ExecutionContext& executionContext = *this->executionContext(); | 124 ExecutionContext& executionContext = *this->executionContext(); |
125 ResourceRequest request(m_url); | 125 ResourceRequest request(m_url); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 m_requestInFlight = false; | 165 m_requestInFlight = false; |
166 | 166 |
167 if (m_state != CLOSED) | 167 if (m_state != CLOSED) |
168 scheduleReconnect(); | 168 scheduleReconnect(); |
169 } | 169 } |
170 | 170 |
171 void EventSource::scheduleReconnect() | 171 void EventSource::scheduleReconnect() |
172 { | 172 { |
173 m_state = CONNECTING; | 173 m_state = CONNECTING; |
174 m_connectTimer.startOneShot(m_reconnectDelay / 1000.0, FROM_HERE); | 174 m_connectTimer.startOneShot(m_reconnectDelay / 1000.0, BLINK_FROM_HERE); |
175 dispatchEvent(Event::create(EventTypeNames::error)); | 175 dispatchEvent(Event::create(EventTypeNames::error)); |
176 } | 176 } |
177 | 177 |
178 void EventSource::connectTimerFired(Timer<EventSource>*) | 178 void EventSource::connectTimerFired(Timer<EventSource>*) |
179 { | 179 { |
180 connect(); | 180 connect(); |
181 } | 181 } |
182 | 182 |
183 String EventSource::url() const | 183 String EventSource::url() const |
184 { | 184 { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 return event.release(); | 446 return event.release(); |
447 } | 447 } |
448 | 448 |
449 DEFINE_TRACE(EventSource) | 449 DEFINE_TRACE(EventSource) |
450 { | 450 { |
451 RefCountedGarbageCollectedEventTargetWithInlineData::trace(visitor); | 451 RefCountedGarbageCollectedEventTargetWithInlineData::trace(visitor); |
452 ActiveDOMObject::trace(visitor); | 452 ActiveDOMObject::trace(visitor); |
453 } | 453 } |
454 | 454 |
455 } // namespace blink | 455 } // namespace blink |
OLD | NEW |