Chromium Code Reviews| Index: Source/core/dom/XMLDocument.h |
| diff --git a/Source/modules/speech/SpeechRecognitionAlternative.h b/Source/core/dom/XMLDocument.h |
| similarity index 64% |
| copy from Source/modules/speech/SpeechRecognitionAlternative.h |
| copy to Source/core/dom/XMLDocument.h |
| index 464fe9e276e55c1839128720679955974880448b..b65b19ca4252db5e31af60a994e778762187b971 100644 |
| --- a/Source/modules/speech/SpeechRecognitionAlternative.h |
| +++ b/Source/core/dom/XMLDocument.h |
| @@ -1,5 +1,5 @@ |
| /* |
| - * Copyright (C) 2012 Google Inc. All rights reserved. |
| + * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions |
| @@ -23,31 +23,32 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef SpeechRecognitionAlternative_h |
| -#define SpeechRecognitionAlternative_h |
| +#ifndef XMLDocument_h |
| +#define XMLDocument_h |
| -#include "bindings/v8/ScriptWrappable.h" |
| -#include "wtf/RefCounted.h" |
| -#include "wtf/text/WTFString.h" |
| +#include "core/dom/Document.h" |
| +#include "wtf/PassRefPtr.h" |
| namespace WebCore { |
| -class ExecutionContext; |
| - |
| -class SpeechRecognitionAlternative : public ScriptWrappable, public RefCounted<SpeechRecognitionAlternative> { |
| +class XMLDocument : public Document { |
| public: |
| - static PassRefPtr<SpeechRecognitionAlternative> create(const String&, double); |
| - |
| - const String& transcript() const { return m_transcript; } |
| - double confidence() const { return m_confidence; } |
| - |
| -private: |
| - SpeechRecognitionAlternative(const String&, double); |
| - |
| - String m_transcript; |
| - double m_confidence; |
| + static PassRefPtr<XMLDocument> create(const DocumentInit& initializer = DocumentInit()) |
| + { |
| + return adoptRef(new XMLDocument(initializer, XMLDocumentClass)); |
| + } |
| + |
| + static PassRefPtr<XMLDocument> createXHTML(const DocumentInit& initializer = DocumentInit()) |
|
arv (Not doing code reviews)
2014/01/22 15:24:19
Is there a need for createSVG?
Inactive
2014/01/22 15:39:26
Not yet since we still have an SVGDocument subclas
|
| + { |
| + return adoptRef(new XMLDocument(initializer, XMLDocumentClass | XHTMLDocumentClass)); |
| + } |
| + |
| +protected: |
| + XMLDocument(const DocumentInit&, DocumentClassFlags documentClasses); |
| }; |
| +DEFINE_DOCUMENT_TYPE_CASTS(XMLDocument); |
| + |
| } // namespace WebCore |
| -#endif // SpeechRecognitionAlternative_h |
| +#endif // XMLDocument_h |