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

Side by Side Diff: Source/core/html/track/vtt/VTTToken.h

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/html/track/vtt/VTTScanner.h ('k') | Source/core/html/track/vtt/VTTTokenizer.h » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef VTTToken_h 31 #ifndef VTTToken_h
32 #define VTTToken_h 32 #define VTTToken_h
33 33
34 #include "wtf/Allocator.h"
35
34 namespace blink { 36 namespace blink {
35 37
36 class VTTTokenTypes { 38 class VTTTokenTypes {
39 STATIC_ONLY(VTTTokenTypes);
37 public: 40 public:
38 enum Type { 41 enum Type {
39 Uninitialized, 42 Uninitialized,
40 Character, 43 Character,
41 StartTag, 44 StartTag,
42 EndTag, 45 EndTag,
43 TimestampTag, 46 TimestampTag,
44 }; 47 };
45 }; 48 };
46 49
47 class VTTToken { 50 class VTTToken {
51 STACK_ALLOCATED();
48 public: 52 public:
49 typedef VTTTokenTypes Type; 53 typedef VTTTokenTypes Type;
50 54
51 VTTToken() : m_type(Type::Uninitialized) { } 55 VTTToken() : m_type(Type::Uninitialized) { }
52 56
53 static VTTToken StringToken(const String& characterData) 57 static VTTToken StringToken(const String& characterData)
54 { 58 {
55 return VTTToken(Type::Character, characterData); 59 return VTTToken(Type::Character, characterData);
56 } 60 }
57 static VTTToken StartTag(const String& tagName, const AtomicString& classes = emptyAtom, const AtomicString& annotation = emptyAtom) 61 static VTTToken StartTag(const String& tagName, const AtomicString& classes = emptyAtom, const AtomicString& annotation = emptyAtom)
(...skipping 25 matching lines...) Expand all
83 87
84 Type::Type m_type; 88 Type::Type m_type;
85 String m_data; 89 String m_data;
86 AtomicString m_annotation; 90 AtomicString m_annotation;
87 AtomicString m_classes; 91 AtomicString m_classes;
88 }; 92 };
89 93
90 } 94 }
91 95
92 #endif 96 #endif
OLDNEW
« no previous file with comments | « Source/core/html/track/vtt/VTTScanner.h ('k') | Source/core/html/track/vtt/VTTTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698