| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved. |    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 
|    3  * Copyright (C) 2013 Google Inc. All Rights Reserved. |    3  * Copyright (C) 2013 Google Inc. All Rights Reserved. | 
|    4  * |    4  * | 
|    5  * Redistribution and use in source and binary forms, with or without |    5  * Redistribution and use in source and binary forms, with or without | 
|    6  * modification, are permitted provided that the following conditions |    6  * modification, are permitted provided that the following conditions | 
|    7  * are met: |    7  * are met: | 
|    8  * 1. Redistributions of source code must retain the above copyright |    8  * 1. 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  * 2. Redistributions in binary form must reproduce the above copyright |   10  * 2. Redistributions in binary form must reproduce the above copyright | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
|   26  */ |   26  */ | 
|   27  |   27  | 
|   28 #include "config.h" |   28 #include "config.h" | 
|   29 #include "core/dom/ContextLifecycleNotifier.h" |   29 #include "core/dom/ContextLifecycleNotifier.h" | 
|   30  |   30  | 
|   31 #include "core/dom/ActiveDOMObject.h" |   31 #include "core/dom/ActiveDOMObject.h" | 
|   32 #include "wtf/TemporaryChange.h" |   32 #include "wtf/TemporaryChange.h" | 
|   33  |   33  | 
|   34 namespace blink { |   34 namespace blink { | 
|   35  |   35  | 
|   36 ContextLifecycleNotifier::ContextLifecycleNotifier(ExecutionContext* context) |  | 
|   37     : LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>(context) |  | 
|   38 { |  | 
|   39 } |  | 
|   40  |  | 
|   41 void ContextLifecycleNotifier::addObserver(ContextLifecycleObserver* observer) |   36 void ContextLifecycleNotifier::addObserver(ContextLifecycleObserver* observer) | 
|   42 { |   37 { | 
|   43     LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>::addObserver(o
     bserver); |   38     LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>::addObserver(o
     bserver); | 
|   44     if (observer->observerType() == ContextLifecycleObserver::ActiveDOMObjectTyp
     e) |   39     if (observer->observerType() == ContextLifecycleObserver::ActiveDOMObjectTyp
     e) | 
|   45         RELEASE_ASSERT(m_iterating != IteratingOverActiveDOMObjects); |   40         RELEASE_ASSERT(m_iterating != IteratingOverActiveDOMObjects); | 
|   46 } |   41 } | 
|   47  |   42  | 
|   48 void ContextLifecycleNotifier::notifyResumingActiveDOMObjects() |   43 void ContextLifecycleNotifier::notifyResumingActiveDOMObjects() | 
|   49 { |   44 { | 
|   50     TemporaryChange<IterationType> scope(m_iterating, IteratingOverActiveDOMObje
     cts); |   45     TemporaryChange<IterationType> scope(m_iterating, IteratingOverActiveDOMObje
     cts); | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  137             continue; |  132             continue; | 
|  138         ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe
     r); |  133         ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe
     r); | 
|  139         if (activeDOMObject == object) |  134         if (activeDOMObject == object) | 
|  140             return true; |  135             return true; | 
|  141     } |  136     } | 
|  142     return false; |  137     return false; | 
|  143 } |  138 } | 
|  144 #endif |  139 #endif | 
|  145  |  140  | 
|  146 } // namespace blink |  141 } // namespace blink | 
| OLD | NEW |