OLD | NEW |
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 static bool collectTimeStamp(const String&, double& timeStamp); | 97 static bool collectTimeStamp(const String&, double& timeStamp); |
98 | 98 |
99 // Useful functions for parsing percentage settings. | 99 // Useful functions for parsing percentage settings. |
100 static bool parseFloatPercentageValue(VTTScanner& valueScanner, float& perce
ntage); | 100 static bool parseFloatPercentageValue(VTTScanner& valueScanner, float& perce
ntage); |
101 static bool parseFloatPercentageValuePair(VTTScanner&, char, FloatPoint&); | 101 static bool parseFloatPercentageValuePair(VTTScanner&, char, FloatPoint&); |
102 | 102 |
103 // Create the DocumentFragment representation of the WebVTT cue text. | 103 // Create the DocumentFragment representation of the WebVTT cue text. |
104 static PassRefPtrWillBeRawPtr<DocumentFragment> createDocumentFragmentFromCu
eText(Document&, const String&); | 104 static PassRefPtrWillBeRawPtr<DocumentFragment> createDocumentFragmentFromCu
eText(Document&, const String&); |
105 | 105 |
106 // Input data to the parser to parse. | 106 // Input data to the parser to parse. |
107 void parseBytes(const char* data, unsigned length); | 107 void parseBytes(const char* data, size_t length); |
108 void flush(); | 108 void flush(); |
109 | 109 |
110 // Transfers ownership of last parsed cues to caller. | 110 // Transfers ownership of last parsed cues to caller. |
111 void getNewCues(HeapVector<Member<TextTrackCue>>&); | 111 void getNewCues(HeapVector<Member<TextTrackCue>>&); |
112 void getNewRegions(HeapVector<Member<VTTRegion>>&); | 112 void getNewRegions(HeapVector<Member<VTTRegion>>&); |
113 | 113 |
114 DECLARE_TRACE(); | 114 DECLARE_TRACE(); |
115 | 115 |
116 private: | 116 private: |
117 VTTParser(VTTParserClient*, Document&); | 117 VTTParser(VTTParserClient*, Document&); |
(...skipping 29 matching lines...) Expand all Loading... |
147 VTTParserClient* m_client; | 147 VTTParserClient* m_client; |
148 | 148 |
149 HeapVector<Member<TextTrackCue>> m_cueList; | 149 HeapVector<Member<TextTrackCue>> m_cueList; |
150 | 150 |
151 HeapVector<Member<VTTRegion>> m_regionList; | 151 HeapVector<Member<VTTRegion>> m_regionList; |
152 }; | 152 }; |
153 | 153 |
154 } // namespace blink | 154 } // namespace blink |
155 | 155 |
156 #endif | 156 #endif |
OLD | NEW |