Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/Source/core/page/EventSource.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 scheduleReconnect(); 163 scheduleReconnect();
164 } 164 }
165 165
166 void EventSource::scheduleReconnect() 166 void EventSource::scheduleReconnect()
167 { 167 {
168 m_state = CONNECTING; 168 m_state = CONNECTING;
169 m_connectTimer.startOneShot(m_reconnectDelay / 1000.0, BLINK_FROM_HERE); 169 m_connectTimer.startOneShot(m_reconnectDelay / 1000.0, BLINK_FROM_HERE);
170 dispatchEvent(Event::create(EventTypeNames::error)); 170 dispatchEvent(Event::create(EventTypeNames::error));
171 } 171 }
172 172
173 void EventSource::connectTimerFired(Timer<EventSource>*) 173 void EventSource::connectTimerFired(TimerBase*)
174 { 174 {
175 connect(); 175 connect();
176 } 176 }
177 177
178 String EventSource::url() const 178 String EventSource::url() const
179 { 179 {
180 return m_url.getString(); 180 return m_url.getString();
181 } 181 }
182 182
183 bool EventSource::withCredentials() const 183 bool EventSource::withCredentials() const
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 DEFINE_TRACE(EventSource) 354 DEFINE_TRACE(EventSource)
355 { 355 {
356 visitor->trace(m_parser); 356 visitor->trace(m_parser);
357 EventTargetWithInlineData::trace(visitor); 357 EventTargetWithInlineData::trace(visitor);
358 ActiveDOMObject::trace(visitor); 358 ActiveDOMObject::trace(visitor);
359 EventSourceParser::Client::trace(visitor); 359 EventSourceParser::Client::trace(visitor);
360 } 360 }
361 361
362 } // namespace blink 362 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698