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

Side by Side Diff: third_party/WebKit/Source/core/html/track/vtt/VTTParser.h

Issue 1870603002: Make VTTParserClient the GC mixin it needs to be. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidying Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/core/html/track/vtt/VTTParser.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 29 matching lines...) Expand all
40 #include "core/html/track/vtt/VTTTokenizer.h" 40 #include "core/html/track/vtt/VTTTokenizer.h"
41 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
42 #include "wtf/PassOwnPtr.h" 42 #include "wtf/PassOwnPtr.h"
43 #include "wtf/text/StringBuilder.h" 43 #include "wtf/text/StringBuilder.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class Document; 47 class Document;
48 class VTTScanner; 48 class VTTScanner;
49 49
50 class VTTParserClient { 50 class VTTParserClient : public GarbageCollectedMixin {
51 public: 51 public:
52 virtual ~VTTParserClient() { } 52 virtual ~VTTParserClient() { }
53 53
54 virtual void newCuesParsed() = 0; 54 virtual void newCuesParsed() = 0;
55 virtual void newRegionsParsed() = 0; 55 virtual void newRegionsParsed() = 0;
56 virtual void fileFailedToParse() = 0; 56 virtual void fileFailedToParse() = 0;
57
58 DEFINE_INLINE_VIRTUAL_TRACE() { }
57 }; 59 };
58 60
59 class VTTParser final : public GarbageCollectedFinalized<VTTParser> { 61 class VTTParser final : public GarbageCollectedFinalized<VTTParser> {
60 public: 62 public:
61 enum ParseState { 63 enum ParseState {
62 Initial, 64 Initial,
63 Header, 65 Header,
64 Id, 66 Id,
65 TimingsAndSettings, 67 TimingsAndSettings,
66 CueText, 68 CueText,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 static bool collectTimeStamp(VTTScanner& input, double& timeStamp); 139 static bool collectTimeStamp(VTTScanner& input, double& timeStamp);
138 140
139 BufferedLineReader m_lineReader; 141 BufferedLineReader m_lineReader;
140 OwnPtr<TextResourceDecoder> m_decoder; 142 OwnPtr<TextResourceDecoder> m_decoder;
141 AtomicString m_currentId; 143 AtomicString m_currentId;
142 double m_currentStartTime; 144 double m_currentStartTime;
143 double m_currentEndTime; 145 double m_currentEndTime;
144 StringBuilder m_currentContent; 146 StringBuilder m_currentContent;
145 String m_currentSettings; 147 String m_currentSettings;
146 148
147 VTTParserClient* m_client; 149 Member<VTTParserClient> m_client;
148 150
149 HeapVector<Member<TextTrackCue>> m_cueList; 151 HeapVector<Member<TextTrackCue>> m_cueList;
150 152
151 HeapVector<Member<VTTRegion>> m_regionList; 153 HeapVector<Member<VTTRegion>> m_regionList;
152 }; 154 };
153 155
154 } // namespace blink 156 } // namespace blink
155 157
156 #endif 158 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698