Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Unified Diff: Source/core/dom/ContextLifecycleNotifier.h

Issue 901663005: Revert r189385 "Remove LifecycleContext" and r189391, r189530, r189456 that block it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ActiveDOMObject.cpp ('k') | Source/core/dom/ContextLifecycleNotifier.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/dom/ActiveDOMObject.cpp ('k') | Source/core/dom/ContextLifecycleNotifier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698