OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // ActiveDOMObject | 302 // ActiveDOMObject |
303 void RTCDataChannel::suspend() { | 303 void RTCDataChannel::suspend() { |
304 m_scheduledEventTimer.stop(); | 304 m_scheduledEventTimer.stop(); |
305 } | 305 } |
306 | 306 |
307 void RTCDataChannel::resume() { | 307 void RTCDataChannel::resume() { |
308 if (!m_scheduledEvents.isEmpty() && !m_scheduledEventTimer.isActive()) | 308 if (!m_scheduledEvents.isEmpty() && !m_scheduledEventTimer.isActive()) |
309 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); | 309 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); |
310 } | 310 } |
311 | 311 |
312 void RTCDataChannel::stop() { | 312 void RTCDataChannel::contextDestroyed() { |
313 if (m_stopped) | 313 if (m_stopped) |
314 return; | 314 return; |
315 | 315 |
316 m_stopped = true; | 316 m_stopped = true; |
317 m_handler->setClient(nullptr); | 317 m_handler->setClient(nullptr); |
318 m_handler.reset(); | 318 m_handler.reset(); |
319 } | 319 } |
320 | 320 |
321 // ActiveScriptWrappable | 321 // ActiveScriptWrappable |
322 bool RTCDataChannel::hasPendingActivity() const { | 322 bool RTCDataChannel::hasPendingActivity() const { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 events.clear(); | 372 events.clear(); |
373 } | 373 } |
374 | 374 |
375 DEFINE_TRACE(RTCDataChannel) { | 375 DEFINE_TRACE(RTCDataChannel) { |
376 visitor->trace(m_scheduledEvents); | 376 visitor->trace(m_scheduledEvents); |
377 EventTargetWithInlineData::trace(visitor); | 377 EventTargetWithInlineData::trace(visitor); |
378 ActiveDOMObject::trace(visitor); | 378 ActiveDOMObject::trace(visitor); |
379 } | 379 } |
380 | 380 |
381 } // namespace blink | 381 } // namespace blink |
OLD | NEW |