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

Side by Side Diff: Source/core/html/track/WebVTTParser.h

Issue 65343003: Make metadata state local in the WebVTT parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | Source/core/html/track/WebVTTParser.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) 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool hasRequiredFileIdentifier(const String& line); 123 bool hasRequiredFileIdentifier(const String& line);
124 ParseState collectCueId(const String&); 124 ParseState collectCueId(const String&);
125 ParseState collectTimingsAndSettings(const String&); 125 ParseState collectTimingsAndSettings(const String&);
126 ParseState collectCueText(const String&); 126 ParseState collectCueText(const String&);
127 ParseState ignoreBadCue(const String&); 127 ParseState ignoreBadCue(const String&);
128 128
129 void createNewCue(); 129 void createNewCue();
130 void resetCueValues(); 130 void resetCueValues();
131 131
132 void collectMetadataHeader(const String&); 132 void collectMetadataHeader(const String&);
133 void createNewRegion(); 133 void createNewRegion(const String& headerValue);
134 134
135 void skipWhiteSpace(const String&, unsigned*); 135 void skipWhiteSpace(const String&, unsigned*);
136 136
137 String m_currentHeaderName;
138 String m_currentHeaderValue;
139
140 BufferedLineReader m_lineReader; 137 BufferedLineReader m_lineReader;
141 RefPtr<TextResourceDecoder> m_decoder; 138 RefPtr<TextResourceDecoder> m_decoder;
142 String m_currentId; 139 String m_currentId;
143 double m_currentStartTime; 140 double m_currentStartTime;
144 double m_currentEndTime; 141 double m_currentEndTime;
145 StringBuilder m_currentContent; 142 StringBuilder m_currentContent;
146 String m_currentSettings; 143 String m_currentSettings;
147 144
148 WebVTTParserClient* m_client; 145 WebVTTParserClient* m_client;
149 146
150 Vector<RefPtr<TextTrackCue> > m_cuelist; 147 Vector<RefPtr<TextTrackCue> > m_cuelist;
151 148
152 Vector<RefPtr<VTTRegion> > m_regionList; 149 Vector<RefPtr<VTTRegion> > m_regionList;
153 }; 150 };
154 151
155 } // namespace WebCore 152 } // namespace WebCore
156 153
157 #endif 154 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698