| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 DispatchEventResult Notification::dispatchEventInternal(Event* event) { | 369 DispatchEventResult Notification::dispatchEventInternal(Event* event) { |
| 370 DCHECK(getExecutionContext()->isContextThread()); | 370 DCHECK(getExecutionContext()->isContextThread()); |
| 371 return EventTarget::dispatchEventInternal(event); | 371 return EventTarget::dispatchEventInternal(event); |
| 372 } | 372 } |
| 373 | 373 |
| 374 const AtomicString& Notification::interfaceName() const { | 374 const AtomicString& Notification::interfaceName() const { |
| 375 return EventTargetNames::Notification; | 375 return EventTargetNames::Notification; |
| 376 } | 376 } |
| 377 | 377 |
| 378 void Notification::contextDestroyed() { | 378 void Notification::contextDestroyed(ExecutionContext*) { |
| 379 notificationManager()->notifyDelegateDestroyed(this); | 379 notificationManager()->notifyDelegateDestroyed(this); |
| 380 | 380 |
| 381 m_state = State::Closed; | 381 m_state = State::Closed; |
| 382 | 382 |
| 383 if (m_prepareShowMethodRunner) | 383 if (m_prepareShowMethodRunner) |
| 384 m_prepareShowMethodRunner->stop(); | 384 m_prepareShowMethodRunner->stop(); |
| 385 | 385 |
| 386 if (m_loader) | 386 if (m_loader) |
| 387 m_loader->stop(); | 387 m_loader->stop(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 bool Notification::hasPendingActivity() const { | 390 bool Notification::hasPendingActivity() const { |
| 391 // Non-persistent notification can receive events until they've been closed. | 391 // Non-persistent notification can receive events until they've been closed. |
| 392 // Persistent notifications should be subject to regular garbage collection. | 392 // Persistent notifications should be subject to regular garbage collection. |
| 393 if (m_type == Type::NonPersistent) | 393 if (m_type == Type::NonPersistent) |
| 394 return m_state != State::Closed; | 394 return m_state != State::Closed; |
| 395 | 395 |
| 396 return false; | 396 return false; |
| 397 } | 397 } |
| 398 | 398 |
| 399 DEFINE_TRACE(Notification) { | 399 DEFINE_TRACE(Notification) { |
| 400 visitor->trace(m_prepareShowMethodRunner); | 400 visitor->trace(m_prepareShowMethodRunner); |
| 401 visitor->trace(m_loader); | 401 visitor->trace(m_loader); |
| 402 EventTargetWithInlineData::trace(visitor); | 402 EventTargetWithInlineData::trace(visitor); |
| 403 ContextLifecycleObserver::trace(visitor); | 403 ContextLifecycleObserver::trace(visitor); |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace blink | 406 } // namespace blink |
| OLD | NEW |