Index: Source/core/dom/ContextLifecycleNotifier.h |
diff --git a/Source/core/dom/ContextLifecycleNotifier.h b/Source/core/dom/ContextLifecycleNotifier.h |
index 178bf676ddc25d37917f03c261bbf2d8a4fd5fb1..03b3defecfc324148634fff074bd8b69fb87fece 100644 |
--- a/Source/core/dom/ContextLifecycleNotifier.h |
+++ b/Source/core/dom/ContextLifecycleNotifier.h |
@@ -24,10 +24,10 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
- |
#ifndef ContextLifecycleNotifier_h |
#define ContextLifecycleNotifier_h |
+#include "core/dom/ExecutionContext.h" |
#include "platform/LifecycleNotifier.h" |
#include "wtf/HashSet.h" |
#include "wtf/PassOwnPtr.h" |
@@ -35,10 +35,13 @@ |
namespace blink { |
class ActiveDOMObject; |
-class ExecutionContext; |
class ContextLifecycleNotifier : public LifecycleNotifier<ExecutionContext> { |
public: |
+ static PassOwnPtr<ContextLifecycleNotifier> create(ExecutionContext*); |
+ |
+ virtual ~ContextLifecycleNotifier(); |
+ |
typedef HashSet<ActiveDOMObject*> ActiveDOMObjectSet; |
const ActiveDOMObjectSet& activeDOMObjects() const { return m_activeDOMObjects; } |
@@ -60,6 +63,11 @@ private: |
ActiveDOMObjectSet m_activeDOMObjects; |
}; |
+inline PassOwnPtr<ContextLifecycleNotifier> ContextLifecycleNotifier::create(ExecutionContext* context) |
+{ |
+ return adoptPtr(new ContextLifecycleNotifier(context)); |
+} |
+ |
} // namespace blink |
#endif // ContextLifecycleNotifier_h |