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

Side by Side Diff: Source/core/html/parser/HTMLViewSourceParser.h

Issue 277633002: Convert DocumentParser code to Use more reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make TextDocument use reference as well 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 18 matching lines...) Expand all
29 #include "core/dom/DecodedDataDocumentParser.h" 29 #include "core/dom/DecodedDataDocumentParser.h"
30 #include "core/html/HTMLViewSourceDocument.h" 30 #include "core/html/HTMLViewSourceDocument.h"
31 #include "core/html/parser/HTMLInputStream.h" 31 #include "core/html/parser/HTMLInputStream.h"
32 #include "core/html/parser/HTMLSourceTracker.h" 32 #include "core/html/parser/HTMLSourceTracker.h"
33 #include "core/html/parser/HTMLTokenizer.h" 33 #include "core/html/parser/HTMLTokenizer.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 class HTMLViewSourceParser FINAL : public DecodedDataDocumentParser { 37 class HTMLViewSourceParser FINAL : public DecodedDataDocumentParser {
38 public: 38 public:
39 static PassRefPtr<HTMLViewSourceParser> create(HTMLViewSourceDocument* docum ent, const String& mimeType) 39 static PassRefPtr<HTMLViewSourceParser> create(HTMLViewSourceDocument& docum ent, const String& mimeType)
40 { 40 {
41 return adoptRef(new HTMLViewSourceParser(document, mimeType)); 41 return adoptRef(new HTMLViewSourceParser(document, mimeType));
42 } 42 }
43 virtual ~HTMLViewSourceParser() { } 43 virtual ~HTMLViewSourceParser() { }
44 44
45 private: 45 private:
46 HTMLViewSourceParser(HTMLViewSourceDocument*, const String& mimeType); 46 HTMLViewSourceParser(HTMLViewSourceDocument&, const String& mimeType);
47 47
48 // DocumentParser 48 // DocumentParser
49 virtual void insert(const SegmentedString&) OVERRIDE { ASSERT_NOT_REACHED(); } 49 virtual void insert(const SegmentedString&) OVERRIDE { ASSERT_NOT_REACHED(); }
50 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; 50 virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
51 virtual void finish() OVERRIDE; 51 virtual void finish() OVERRIDE;
52 52
53 HTMLViewSourceDocument* document() const { return static_cast<HTMLViewSource Document*>(DecodedDataDocumentParser::document()); } 53 HTMLViewSourceDocument* document() const { return static_cast<HTMLViewSource Document*>(DecodedDataDocumentParser::document()); }
54 54
55 void pumpTokenizer(); 55 void pumpTokenizer();
56 void updateTokenizerState(); 56 void updateTokenizerState();
57 57
58 HTMLInputStream m_input; 58 HTMLInputStream m_input;
59 HTMLToken m_token; 59 HTMLToken m_token;
60 HTMLSourceTracker m_sourceTracker; 60 HTMLSourceTracker m_sourceTracker;
61 OwnPtr<HTMLTokenizer> m_tokenizer; 61 OwnPtr<HTMLTokenizer> m_tokenizer;
62 }; 62 };
63 63
64 } 64 }
65 65
66 #endif 66 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.cpp ('k') | Source/core/html/parser/HTMLViewSourceParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698