| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 enum State { Idle, Loading, Finished, Failed }; | 64 enum State { Idle, Loading, Finished, Failed }; |
| 65 State loadState() { return m_state; } | 65 State loadState() { return m_state; } |
| 66 | 66 |
| 67 void getNewCues(HeapVector<Member<TextTrackCue>>& outputCues); | 67 void getNewCues(HeapVector<Member<TextTrackCue>>& outputCues); |
| 68 void getNewRegions(HeapVector<Member<VTTRegion>>& outputRegions); | 68 void getNewRegions(HeapVector<Member<VTTRegion>>& outputRegions); |
| 69 | 69 |
| 70 DECLARE_TRACE(); | 70 DECLARE_TRACE(); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 // RawResourceClient | 73 // RawResourceClient |
| 74 void dataReceived(Resource*, const char* data, unsigned length) override; | 74 void dataReceived(Resource*, const char* data, size_t length) override; |
| 75 void notifyFinished(Resource*) override; | 75 void notifyFinished(Resource*) override; |
| 76 String debugName() const override { return "TextTrackLoader"; } | 76 String debugName() const override { return "TextTrackLoader"; } |
| 77 | 77 |
| 78 // VTTParserClient | 78 // VTTParserClient |
| 79 void newCuesParsed() override; | 79 void newCuesParsed() override; |
| 80 void newRegionsParsed() override; | 80 void newRegionsParsed() override; |
| 81 void fileFailedToParse() override; | 81 void fileFailedToParse() override; |
| 82 | 82 |
| 83 TextTrackLoader(TextTrackLoaderClient&, Document&); | 83 TextTrackLoader(TextTrackLoaderClient&, Document&); |
| 84 | 84 |
| 85 void cueLoadTimerFired(Timer<TextTrackLoader>*); | 85 void cueLoadTimerFired(Timer<TextTrackLoader>*); |
| 86 void corsPolicyPreventedLoad(SecurityOrigin*, const KURL&); | 86 void corsPolicyPreventedLoad(SecurityOrigin*, const KURL&); |
| 87 | 87 |
| 88 Document& document() const { return *m_document; } | 88 Document& document() const { return *m_document; } |
| 89 | 89 |
| 90 TextTrackLoaderClient& m_client; | 90 TextTrackLoaderClient& m_client; |
| 91 PersistentWillBeMember<VTTParser> m_cueParser; | 91 PersistentWillBeMember<VTTParser> m_cueParser; |
| 92 // FIXME: Remove this pointer and get the Document from m_client. | 92 // FIXME: Remove this pointer and get the Document from m_client. |
| 93 RawPtrWillBeMember<Document> m_document; | 93 RawPtrWillBeMember<Document> m_document; |
| 94 Timer<TextTrackLoader> m_cueLoadTimer; | 94 Timer<TextTrackLoader> m_cueLoadTimer; |
| 95 State m_state; | 95 State m_state; |
| 96 bool m_newCuesAvailable; | 96 bool m_newCuesAvailable; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace blink | 99 } // namespace blink |
| 100 | 100 |
| 101 #endif | 101 #endif |
| OLD | NEW |