DOMImplementationFront.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
  3. * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. *
  20. */
  21. #ifndef DOMImplementationFront_h
  22. #define DOMImplementationFront_h
  23. // FIXME: This source file exists to work around a problem that occurs trying
  24. // to mix DOMImplementation and WebCore::DOMImplementation in DOM.mm.
  25. // It seems to affect only older versions of gcc. Once the buildbot is upgraded,
  26. // we should consider increasing the minimum required version of gcc to build
  27. // WebCore, and rolling the change that introduced this file back.
  28. #include <wtf/Forward.h>
  29. namespace WebCore {
  30. class CSSStyleSheet;
  31. class Document;
  32. class DocumentType;
  33. class HTMLDocument;
  34. class JSDOMImplementation;
  35. typedef int ExceptionCode;
  36. class DOMImplementationFront {
  37. public:
  38. void ref();
  39. void deref();
  40. bool hasFeature(const String& feature, const String& version) const;
  41. PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&);
  42. PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
  43. DOMImplementationFront* getInterface(const String& feature);
  44. PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&);
  45. PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
  46. };
  47. DOMImplementationFront* implementationFront(Document*);
  48. DOMImplementationFront* implementationFront(JSDOMImplementation*);
  49. } // namespace WebCore
  50. #endif // DOMImplementationFront_h