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

Unified Diff: Source/core/xml/XMLSerializer.h

Issue 534583002: Implemented XMLSerializer in PrivateScript. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/core/xml/XMLSerializer.h
diff --git a/Source/core/xml/XMLSerializer.h b/Source/core/xml/XMLSerializer.h
index afd72333435d505484d0fa9963c2323df90f94ce..12e4352b0781ed18ccfbb0f1f06fd30155a3ab62 100644
--- a/Source/core/xml/XMLSerializer.h
+++ b/Source/core/xml/XMLSerializer.h
@@ -28,15 +28,16 @@
namespace blink {
+class Document;
class ExceptionState;
class Node;
class XMLSerializer FINAL : public RefCountedWillBeGarbageCollected<XMLSerializer>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtrWillBeRawPtr<XMLSerializer> create()
+ static PassRefPtrWillBeRawPtr<XMLSerializer> create(Document& document)
{
- return adoptRefWillBeNoop(new XMLSerializer);
+ return adoptRefWillBeNoop(new XMLSerializer(document));
}
String serializeToString(Node*, ExceptionState&);
@@ -44,10 +45,13 @@ public:
void trace(Visitor*) { }
private:
- XMLSerializer()
+ XMLSerializer(Document& document)
+ : m_document(&document)
{
ScriptWrappable::init(this);
}
+
+ RefPtrWillBeMember<Document> m_document;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698