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

Unified Diff: Source/core/html/track/WebVTTParser.h

Issue 59453002: Add a flushing mechanism for the WebVTTParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Even more binary 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/track/WebVTTParser.h
diff --git a/Source/core/html/track/WebVTTParser.h b/Source/core/html/track/WebVTTParser.h
index 8b89f5d68cf5855c5902c541dc9895320e383ca3..f7f53fb90fab335f0cd1390b595714859779d4e9 100644
--- a/Source/core/html/track/WebVTTParser.h
+++ b/Source/core/html/track/WebVTTParser.h
@@ -105,6 +105,7 @@ public:
// Input data to the parser to parse.
void parseBytes(const char* data, unsigned length);
+ void flush();
// Transfers ownership of last parsed cues to caller.
void getNewCues(Vector<RefPtr<TextTrackCue> >&);
@@ -116,10 +117,12 @@ private:
Document* m_document;
ParseState m_state;
+ void parse(const String& textData);
+ void flushPendingCue();
bool hasRequiredFileIdentifier(const String& line);
ParseState collectCueId(const String&);
ParseState collectTimingsAndSettings(const String&);
- ParseState collectCueText(const String&, bool);
+ ParseState collectCueText(const String&);
ParseState ignoreBadCue(const String&);
void createNewCue();
« no previous file with comments | « LayoutTests/media/track/captions-webvtt/captions-multiline-lf.vtt ('k') | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698