diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/dom/DOMImplementation.h | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/dom/DOMImplementation.h')
-rw-r--r-- | WebCore/dom/DOMImplementation.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/WebCore/dom/DOMImplementation.h b/WebCore/dom/DOMImplementation.h index 736ca7b..9e6f9a9 100644 --- a/WebCore/dom/DOMImplementation.h +++ b/WebCore/dom/DOMImplementation.h @@ -1,10 +1,8 @@ /* - * This file is part of the DOM implementation for KDE. - * * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -26,8 +24,8 @@ #ifndef DOMImplementation_h #define DOMImplementation_h +#include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> -#include <wtf/Forward.h> namespace WebCore { @@ -42,32 +40,31 @@ typedef int ExceptionCode; class DOMImplementation : public RefCounted<DOMImplementation> { public: - virtual ~DOMImplementation(); + static PassRefPtr<DOMImplementation> create() { return adoptRef(new DOMImplementation); } // DOM methods & attributes for DOMImplementation - bool hasFeature(const String& feature, const String& version) const; - PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String &systemId, ExceptionCode&); - PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&); + static bool hasFeature(const String& feature, const String& version); + static PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String &systemId, ExceptionCode&); + static PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&); - DOMImplementation* getInterface(const String& feature) const; + DOMImplementation* getInterface(const String& feature); // From the DOMImplementationCSS interface - PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&); + static PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&); // From the HTMLDOMImplementation interface - PassRefPtr<HTMLDocument> createHTMLDocument(const String& title); + static PassRefPtr<HTMLDocument> createHTMLDocument(const String& title); // Other methods (not part of DOM) - PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, bool inViewSourceMode); - PassRefPtr<Document> createDocument(Frame*); - PassRefPtr<HTMLDocument> createHTMLDocument(Frame*); - - // Returns the static instance of this class - only one instance of this class should - // ever be present, and is used as a factory method for creating Document objects - static DOMImplementation* instance(); + static PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, bool inViewSourceMode); + static PassRefPtr<Document> createDocument(Frame*); + static PassRefPtr<HTMLDocument> createHTMLDocument(Frame*); static bool isXMLMIMEType(const String& MIMEType); static bool isTextMIMEType(const String& MIMEType); + +private: + DOMImplementation() { } }; } //namespace |