| 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 | 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/dom/DocumentLifecycleNotifier.h" | 28 #include "core/dom/DocumentLifecycleNotifier.h" |
| 29 | 29 |
| 30 #include "core/dom/DocumentLifecycleObserver.h" | 30 #include "core/dom/DocumentLifecycleObserver.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 DocumentLifecycleNotifier::DocumentLifecycleNotifier(Document* document) | |
| 35 : LifecycleNotifier<Document, DocumentLifecycleObserver>(document) | |
| 36 { | |
| 37 } | |
| 38 | |
| 39 void DocumentLifecycleNotifier::notifyDocumentWasDetached() | 34 void DocumentLifecycleNotifier::notifyDocumentWasDetached() |
| 40 { | 35 { |
| 41 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); | 36 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); |
| 42 for (DocumentLifecycleObserver* observer : m_observers) | 37 for (DocumentLifecycleObserver* observer : m_observers) |
| 43 observer->documentWasDetached(); | 38 observer->documentWasDetached(); |
| 44 } | 39 } |
| 45 | 40 |
| 46 #if !ENABLE(OILPAN) | 41 #if !ENABLE(OILPAN) |
| 47 void DocumentLifecycleNotifier::notifyDocumentWasDisposed() | 42 void DocumentLifecycleNotifier::notifyDocumentWasDisposed() |
| 48 { | 43 { |
| 49 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); | 44 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); |
| 50 for (DocumentLifecycleObserver* observer : m_observers) | 45 for (DocumentLifecycleObserver* observer : m_observers) |
| 51 observer->documentWasDisposed(); | 46 observer->documentWasDisposed(); |
| 52 } | 47 } |
| 53 #endif | 48 #endif |
| 54 | 49 |
| 55 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |