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

Unified Diff: Source/core/dom/DocumentLifecycle.cpp

Issue 25036004: Add a lifecycle state machine for Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 3 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/DocumentLifecycle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentLifecycle.cpp
diff --git a/Source/core/html/HTMLMediaSource.cpp b/Source/core/dom/DocumentLifecycle.cpp
similarity index 85%
copy from Source/core/html/HTMLMediaSource.cpp
copy to Source/core/dom/DocumentLifecycle.cpp
index 7221cfeaf34ed4e40fd174029a3fa66a6d8dd411..35af202cf8f6a34ab3f3fb76981cc7af60584ea8 100644
--- a/Source/core/html/HTMLMediaSource.cpp
+++ b/Source/core/dom/DocumentLifecycle.cpp
@@ -29,16 +29,25 @@
*/
#include "config.h"
-#include "core/html/HTMLMediaSource.h"
+#include "core/dom/DocumentLifecycle.h"
+
+#include "wtf/Assertions.h"
namespace WebCore {
-URLRegistry* HTMLMediaSource::s_registry = 0;
+DocumentLifecycle::DocumentLifecycle()
+ : m_state(Uninitialized)
+{
+}
+
+DocumentLifecycle::~DocumentLifecycle()
+{
+}
-void HTMLMediaSource::setRegistry(URLRegistry* registry)
+void DocumentLifecycle::advanceTo(State state)
{
- ASSERT(!s_registry);
- s_registry = registry;
+ ASSERT(state > m_state);
+ m_state = state;
}
}
« no previous file with comments | « Source/core/dom/DocumentLifecycle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698