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

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

Issue 18808004: Refactoring: Extract DocumentInit for capture Document construction parameter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed webkit_unit_tests build failure. Created 7 years, 5 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/Document.cpp ('k') | Source/core/dom/DocumentInit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentInit.h
diff --git a/Source/core/dom/DocumentOrderedList.h b/Source/core/dom/DocumentInit.h
similarity index 63%
copy from Source/core/dom/DocumentOrderedList.h
copy to Source/core/dom/DocumentInit.h
index 8dde172864e28b463855a252fcc75ff453bc6312..893662fb0e7eea6a5b9113026d3b6799e3e8ea6a 100644
--- a/Source/core/dom/DocumentOrderedList.h
+++ b/Source/core/dom/DocumentInit.h
@@ -25,36 +25,43 @@
*
*/
-#ifndef DocumentOrderedList_h
-#define DocumentOrderedList_h
+#ifndef DocumentInit_h
+#define DocumentInit_h
-#include "wtf/FastAllocBase.h"
-#include "wtf/ListHashSet.h"
+#include "core/dom/SecurityContext.h"
+#include "weborigin/KURL.h"
namespace WebCore {
-class Node;
+class Frame;
+class HTMLImport;
+class Settings;
-class DocumentOrderedList {
- WTF_MAKE_NONCOPYABLE(DocumentOrderedList); WTF_MAKE_FAST_ALLOCATED;
+class DocumentInit {
public:
- DocumentOrderedList() { }
+ explicit DocumentInit(const KURL& url = KURL(), Frame* frame = 0, HTMLImport* import = 0)
+ : m_url(url)
+ , m_frame(frame)
+ , m_import(import)
+ { }
- void add(Node*);
- void parserAdd(Node*);
- void remove(Node*);
- bool isEmpty() const { return m_nodes.isEmpty(); }
- void clear() { m_nodes.clear(); }
+ const KURL& url() const { return m_url; }
+ Frame* frame() const { return m_frame; }
+ HTMLImport* import() const { return m_import; }
- typedef ListHashSet<Node*, 32>::iterator iterator;
+ bool shouldTreatURLAsSrcdocDocument() const;
+ bool shouldSetURL() const;
+ SandboxFlags sandboxFlags() const;
- iterator begin() { return m_nodes.begin(); }
- iterator end() { return m_nodes.end(); }
+ Frame* ownerFrame() const;
+ Settings* settings() const;
private:
- ListHashSet<Node*, 32> m_nodes;
+ KURL m_url;
+ Frame* m_frame;
+ HTMLImport* m_import;
};
-}
+} // namespace WebCore
-#endif
+#endif // DocumentInit_h
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentInit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698