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 3 // found in the LICENSE file. 4 5 #ifndef JSXPATHNSRESOLVER_H__ 6 #define JSXPATHNSRESOLVER_H__ 7 8 #if ENABLE(XPATH) 9 10 #include <v8.h> 11 #include <wtf/RefCounted.h> 12 #include "XPathNSResolver.h" 13 14 namespace WebCore { 15 16 class String; 17 18 class JSXPathNSResolver : public XPathNSResolver { 19 public: 20 21 JSXPathNSResolver(v8::Handle<v8::Object> resolver); 22 virtual ~JSXPathNSResolver(); 23 24 virtual String lookupNamespaceURI(const String& prefix); 25 26 private: 27 v8::Handle<v8::Object> m_resolver; // Handle to resolver object. 28 }; 29 } 30 31 #endif // ENABLE(XPATH) 32 33 #endif // JSXPATHNSRESOLVER_H__ 34