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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return adoptPtrWillBeNoop(new TextTrackLoader(client, document)); | 56 return adoptPtrWillBeNoop(new TextTrackLoader(client, document)); |
57 } | 57 } |
58 virtual ~TextTrackLoader(); | 58 virtual ~TextTrackLoader(); |
59 | 59 |
60 bool load(const KURL&, const AtomicString& crossOriginMode); | 60 bool load(const KURL&, const AtomicString& crossOriginMode); |
61 void cancelLoad(); | 61 void cancelLoad(); |
62 | 62 |
63 enum State { Idle, Loading, Finished, Failed }; | 63 enum State { Idle, Loading, Finished, Failed }; |
64 State loadState() { return m_state; } | 64 State loadState() { return m_state; } |
65 | 65 |
66 void getNewCues(WillBeHeapVector<RefPtrWillBeMember<VTTCue> >& outputCues); | 66 void getNewCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>& outputCu
es); |
67 void getNewRegions(WillBeHeapVector<RefPtrWillBeMember<VTTRegion> >& outputR
egions); | 67 void getNewRegions(WillBeHeapVector<RefPtrWillBeMember<VTTRegion>>& outputRe
gions); |
68 | 68 |
69 void trace(Visitor*); | 69 void trace(Visitor*); |
70 | 70 |
71 private: | 71 private: |
72 // RawResourceClient | 72 // RawResourceClient |
73 virtual void dataReceived(Resource*, const char* data, unsigned length) over
ride; | 73 virtual void dataReceived(Resource*, const char* data, unsigned length) over
ride; |
74 virtual void notifyFinished(Resource*) override; | 74 virtual void notifyFinished(Resource*) override; |
75 | 75 |
76 // VTTParserClient | 76 // VTTParserClient |
77 virtual void newCuesParsed() override; | 77 virtual void newCuesParsed() override; |
(...skipping 12 matching lines...) Expand all Loading... |
90 // FIXME: Remove this pointer and get the Document from m_client. | 90 // FIXME: Remove this pointer and get the Document from m_client. |
91 RawPtrWillBeMember<Document> m_document; | 91 RawPtrWillBeMember<Document> m_document; |
92 Timer<TextTrackLoader> m_cueLoadTimer; | 92 Timer<TextTrackLoader> m_cueLoadTimer; |
93 State m_state; | 93 State m_state; |
94 bool m_newCuesAvailable; | 94 bool m_newCuesAvailable; |
95 }; | 95 }; |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
98 | 98 |
99 #endif | 99 #endif |
OLD | NEW |