OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef XPathExpression_h | 27 #ifndef XPathExpression_h |
28 #define XPathExpression_h | 28 #define XPathExpression_h |
29 | 29 |
30 #include "bindings/core/v8/ScriptWrappable.h" | 30 #include "bindings/core/v8/ScriptWrappable.h" |
31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
32 #include "wtf/Forward.h" | 32 #include "wtf/Forward.h" |
33 #include "wtf/PassRefPtr.h" | |
34 #include "wtf/RefCounted.h" | |
35 | 33 |
36 namespace blink { | 34 namespace blink { |
37 | 35 |
38 class ExceptionState; | 36 class ExceptionState; |
39 class Node; | 37 class Node; |
40 class ScriptValue; | 38 class ScriptValue; |
41 class XPathNSResolver; | 39 class XPathNSResolver; |
42 class XPathResult; | 40 class XPathResult; |
43 | 41 |
44 namespace XPath { | 42 namespace XPath { |
45 class Expression; | 43 class Expression; |
46 } | 44 } |
47 | 45 |
48 class XPathExpression : public RefCountedWillBeGarbageCollected<XPathExpression>
, public ScriptWrappable { | 46 class XPathExpression : public GarbageCollected<XPathExpression>, public ScriptW
rappable { |
49 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathExpression); | |
50 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
51 public: | 48 public: |
52 static PassRefPtrWillBeRawPtr<XPathExpression> create() | 49 static XPathExpression* create() |
53 { | 50 { |
54 return adoptRefWillBeNoop(new XPathExpression); | 51 return new XPathExpression; |
55 } | 52 } |
56 | 53 |
57 static PassRefPtrWillBeRawPtr<XPathExpression> createExpression(const String
& expression, PassRefPtrWillBeRawPtr<XPathNSResolver>, ExceptionState&); | 54 static XPathExpression* createExpression(const String& expression, XPathNSRe
solver*, ExceptionState&); |
58 PassRefPtrWillBeRawPtr<XPathResult> evaluate(Node* contextNode, unsigned sho
rt type, const ScriptValue&, ExceptionState&); | 55 XPathResult* evaluate(Node* contextNode, unsigned short type, const ScriptVa
lue&, ExceptionState&); |
59 | 56 |
60 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
61 | 58 |
62 private: | 59 private: |
63 XPathExpression(); | 60 XPathExpression(); |
64 | 61 |
65 OwnPtrWillBeMember<XPath::Expression> m_topExpression; | 62 Member<XPath::Expression> m_topExpression; |
66 }; | 63 }; |
67 | 64 |
68 } // namespace blink | 65 } // namespace blink |
69 | 66 |
70 #endif // XPathExpression_h | 67 #endif // XPathExpression_h |
OLD | NEW |