Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / xml / XPathResult.h
index a8f90f3..0f8cea0 100644 (file)
 #ifndef XPathResult_h
 #define XPathResult_h
 
-#include "bindings/v8/ScriptWrappable.h"
+#include "bindings/core/v8/ScriptWrappable.h"
 #include "core/xml/XPathValue.h"
 #include "platform/heap/Handle.h"
 #include "wtf/Forward.h"
 #include "wtf/RefCounted.h"
 
-namespace WebCore {
+namespace blink {
 
 class Document;
 class ExceptionState;
 class Node;
 
-class XPathResult : public RefCountedWillBeGarbageCollectedFinalized<XPathResult>, public ScriptWrappable {
+namespace XPath {
+struct EvaluationContext;
+}
+
+class XPathResult FINAL : public RefCountedWillBeGarbageCollected<XPathResult>, public ScriptWrappable {
+    DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathResult);
 public:
     enum XPathResultType {
         ANY_TYPE = 0,
@@ -54,11 +59,10 @@ public:
         FIRST_ORDERED_NODE_TYPE = 9
     };
 
-    static PassRefPtrWillBeRawPtr<XPathResult> create(Document* document, const XPath::Value& value)
+    static PassRefPtrWillBeRawPtr<XPathResult> create(XPath::EvaluationContext& context, const XPath::Value& value)
     {
-        return adoptRefWillBeNoop(new XPathResult(document, value));
+        return adoptRefWillBeNoop(new XPathResult(context, value));
     }
-    ~XPathResult();
 
     void convertTo(unsigned short type, ExceptionState&);
 
@@ -79,7 +83,7 @@ public:
     void trace(Visitor*);
 
 private:
-    XPathResult(Document*, const XPath::Value&);
+    XPathResult(XPath::EvaluationContext&, const XPath::Value&);
     XPath::NodeSet& nodeSet() { return *m_nodeSet; }
 
     XPath::Value m_value;
@@ -90,6 +94,6 @@ private:
     uint64_t m_domTreeVersion;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // XPathResult_h