OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_NODEFILTER_H__ | 5 #ifndef V8_NODEFILTER_H__ |
6 #define V8_NODEFILTER_H__ | 6 #define V8_NODEFILTER_H__ |
7 | 7 |
8 #include <v8.h> | 8 #include <v8.h> |
9 #include "NodeFilterCondition.h" | 9 #include "NodeFilterCondition.h" |
10 | 10 |
11 // NodeFilter is a JavaScript function that takes a Node as parameter | 11 // NodeFilter is a JavaScript function that takes a Node as parameter |
12 // and returns a short (ACCEPT, SKIP, REJECT) as the result. | 12 // and returns a short (ACCEPT, SKIP, REJECT) as the result. |
13 namespace WebCore { | 13 namespace WebCore { |
14 class Node; | 14 class Node; |
15 | 15 |
16 // NodeFilterCondition is a wrapper around a NodeFilter JS function. | 16 // NodeFilterCondition is a wrapper around a NodeFilter JS function. |
17 class V8NodeFilterCondition : public NodeFilterCondition { | 17 class V8NodeFilterCondition : public NodeFilterCondition { |
18 public: | 18 public: |
19 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter); | 19 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter); |
20 virtual ~V8NodeFilterCondition(); | 20 virtual ~V8NodeFilterCondition(); |
21 | 21 |
22 virtual short acceptNode(Node* node) const; | 22 virtual short acceptNode(ExceptionContext* exception_context, |
| 23 Node* node) const; |
23 | 24 |
24 private: | 25 private: |
25 mutable v8::Persistent<v8::Value> m_filter; | 26 mutable v8::Persistent<v8::Value> m_filter; |
26 }; | 27 }; |
27 | 28 |
28 } // namesapce WebCore | 29 } // namesapce WebCore |
29 #endif // V8_NODEFILTER_H__ | 30 #endif // V8_NODEFILTER_H__ |
30 | 31 |
OLD | NEW |