| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CSSTokenizer_h | 5 #ifndef CSSTokenizer_h |
| 6 #define CSSTokenizer_h | 6 #define CSSTokenizer_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/parser/CSSParserToken.h" | 9 #include "core/css/parser/CSSParserToken.h" |
| 10 #include "core/html/parser/InputStreamPreprocessor.h" | 10 #include "core/html/parser/InputStreamPreprocessor.h" |
| 11 #include "wtf/Allocator.h" | 11 #include "wtf/Allocator.h" |
| 12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
| 13 | 13 |
| 14 #include <climits> | 14 #include <climits> |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class CSSTokenizerInputStream; | 18 class CSSTokenizerInputStream; |
| 19 class CSSParserObserverWrapper; | 19 class CSSParserObserverWrapper; |
| 20 struct CSSParserString; | 20 struct CSSParserString; |
| 21 class CSSParserTokenRange; | 21 class CSSParserTokenRange; |
| 22 | 22 |
| 23 class CORE_EXPORT CSSTokenizer { | 23 class CORE_EXPORT CSSTokenizer { |
| 24 WTF_MAKE_NONCOPYABLE(CSSTokenizer); | 24 WTF_MAKE_NONCOPYABLE(CSSTokenizer); |
| 25 USING_FAST_MALLOC(CSSTokenizer); | 25 USING_FAST_MALLOC(CSSTokenizer); |
| 26 public: | 26 public: |
| 27 class CORE_EXPORT Scope { | 27 class CORE_EXPORT Scope { |
| 28 DISALLOW_ALLOCATION(); | 28 DISALLOW_NEW(); |
| 29 public: | 29 public: |
| 30 Scope(const String&); | 30 Scope(const String&); |
| 31 Scope(const String&, CSSParserObserverWrapper&); // For the inspector | 31 Scope(const String&, CSSParserObserverWrapper&); // For the inspector |
| 32 | 32 |
| 33 CSSParserTokenRange tokenRange(); | 33 CSSParserTokenRange tokenRange(); |
| 34 unsigned tokenCount(); | 34 unsigned tokenCount(); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 void storeString(const String& string) { m_stringPool.append(string); } | 37 void storeString(const String& string) { m_stringPool.append(string); } |
| 38 Vector<CSSParserToken> m_tokens; | 38 Vector<CSSParserToken> m_tokens; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 CSSTokenizerInputStream& m_input; | 115 CSSTokenizerInputStream& m_input; |
| 116 Scope& m_scope; | 116 Scope& m_scope; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 | 120 |
| 121 } // namespace blink | 121 } // namespace blink |
| 122 | 122 |
| 123 #endif // CSSTokenizer_h | 123 #endif // CSSTokenizer_h |
| OLD | NEW |