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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 void EventSource::abortConnectionAttempt() { | 354 void EventSource::abortConnectionAttempt() { |
355 DCHECK_EQ(kConnecting, m_state); | 355 DCHECK_EQ(kConnecting, m_state); |
356 | 356 |
357 m_loader = nullptr; | 357 m_loader = nullptr; |
358 m_state = kClosed; | 358 m_state = kClosed; |
359 networkRequestEnded(); | 359 networkRequestEnded(); |
360 | 360 |
361 dispatchEvent(Event::create(EventTypeNames::error)); | 361 dispatchEvent(Event::create(EventTypeNames::error)); |
362 } | 362 } |
363 | 363 |
364 void EventSource::stop() { | 364 void EventSource::contextDestroyed() { |
365 close(); | 365 close(); |
366 } | 366 } |
367 | 367 |
368 bool EventSource::hasPendingActivity() const { | 368 bool EventSource::hasPendingActivity() const { |
369 return m_state != kClosed; | 369 return m_state != kClosed; |
370 } | 370 } |
371 | 371 |
372 DEFINE_TRACE(EventSource) { | 372 DEFINE_TRACE(EventSource) { |
373 visitor->trace(m_parser); | 373 visitor->trace(m_parser); |
374 visitor->trace(m_loader); | 374 visitor->trace(m_loader); |
375 EventTargetWithInlineData::trace(visitor); | 375 EventTargetWithInlineData::trace(visitor); |
376 ActiveDOMObject::trace(visitor); | 376 ActiveDOMObject::trace(visitor); |
377 EventSourceParser::Client::trace(visitor); | 377 EventSourceParser::Client::trace(visitor); |
378 } | 378 } |
379 | 379 |
380 } // namespace blink | 380 } // namespace blink |
OLD | NEW |