Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.h

Issue 276733002: Convert XMLDocumentParser code to Use more reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
5 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 5 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 XMLParserContext(xmlParserCtxtPtr context) 59 XMLParserContext(xmlParserCtxtPtr context)
60 : m_context(context) 60 : m_context(context)
61 { 61 {
62 } 62 }
63 xmlParserCtxtPtr m_context; 63 xmlParserCtxtPtr m_context;
64 }; 64 };
65 65
66 class XMLDocumentParser FINAL : public ScriptableDocumentParser, public Reso urceClient { 66 class XMLDocumentParser FINAL : public ScriptableDocumentParser, public Reso urceClient {
67 WTF_MAKE_FAST_ALLOCATED; 67 WTF_MAKE_FAST_ALLOCATED;
68 public: 68 public:
69 static PassRefPtr<XMLDocumentParser> create(Document* document, FrameVie w* view) 69 static PassRefPtr<XMLDocumentParser> create(Document& document, FrameVie w* view)
70 { 70 {
71 return adoptRef(new XMLDocumentParser(document, view)); 71 return adoptRef(new XMLDocumentParser(document, view));
72 } 72 }
73 static PassRefPtr<XMLDocumentParser> create(DocumentFragment* fragment, Element* element, ParserContentPolicy parserContentPolicy) 73 static PassRefPtr<XMLDocumentParser> create(DocumentFragment* fragment, Element* element, ParserContentPolicy parserContentPolicy)
74 { 74 {
75 return adoptRef(new XMLDocumentParser(fragment, element, parserConte ntPolicy)); 75 return adoptRef(new XMLDocumentParser(fragment, element, parserConte ntPolicy));
76 } 76 }
77 77
78 virtual ~XMLDocumentParser(); 78 virtual ~XMLDocumentParser();
79 79
(...skipping 14 matching lines...) Expand all
94 94
95 static bool supportsXMLVersion(const String&); 95 static bool supportsXMLVersion(const String&);
96 96
97 class PendingCallback { 97 class PendingCallback {
98 public: 98 public:
99 virtual ~PendingCallback() { } 99 virtual ~PendingCallback() { }
100 virtual void call(XMLDocumentParser*) = 0; 100 virtual void call(XMLDocumentParser*) = 0;
101 }; 101 };
102 102
103 private: 103 private:
104 XMLDocumentParser(Document*, FrameView* = 0); 104 explicit XMLDocumentParser(Document&, FrameView* = 0);
105 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy); 105 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy);
106 106
107 // From DocumentParser 107 // From DocumentParser
108 virtual void insert(const SegmentedString&) OVERRIDE; 108 virtual void insert(const SegmentedString&) OVERRIDE;
109 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; 109 virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
110 virtual void finish() OVERRIDE; 110 virtual void finish() OVERRIDE;
111 virtual bool isWaitingForScripts() const OVERRIDE; 111 virtual bool isWaitingForScripts() const OVERRIDE;
112 virtual void stopParsing() OVERRIDE; 112 virtual void stopParsing() OVERRIDE;
113 virtual void detach() OVERRIDE; 113 virtual void detach() OVERRIDE;
114 virtual OrdinalNumber lineNumber() const OVERRIDE; 114 virtual OrdinalNumber lineNumber() const OVERRIDE;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 SegmentedString m_pendingSrc; 191 SegmentedString m_pendingSrc;
192 }; 192 };
193 193
194 xmlDocPtr xmlDocPtrForString(ResourceFetcher*, const String& source, const Strin g& url); 194 xmlDocPtr xmlDocPtrForString(ResourceFetcher*, const String& source, const Strin g& url);
195 195
196 HashMap<String, String> parseAttributes(const String&, bool& attrsOK); 196 HashMap<String, String> parseAttributes(const String&, bool& attrsOK);
197 197
198 } // namespace WebCore 198 } // namespace WebCore
199 199
200 #endif // XMLDocumentParser_h 200 #endif // XMLDocumentParser_h
OLDNEW
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698