| 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 } | 56 } |
| 57 virtual ~TextTrackLoader(); | 57 virtual ~TextTrackLoader(); |
| 58 | 58 |
| 59 bool load(const KURL&, const String& crossOriginMode); | 59 bool load(const KURL&, const String& crossOriginMode); |
| 60 void cancelLoad(); | 60 void cancelLoad(); |
| 61 | 61 |
| 62 enum State { Idle, Loading, Finished, Failed }; | 62 enum State { Idle, Loading, Finished, Failed }; |
| 63 State loadState() { return m_state; } | 63 State loadState() { return m_state; } |
| 64 | 64 |
| 65 void getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues); | 65 void getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues); |
| 66 void getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegions); | 66 void getNewRegions(Vector<RefPtr<VTTRegion> >& outputRegions); |
| 67 private: | 67 private: |
| 68 | 68 |
| 69 // RawResourceClient | 69 // RawResourceClient |
| 70 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE; | 70 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE; |
| 71 virtual void notifyFinished(Resource*) OVERRIDE; | 71 virtual void notifyFinished(Resource*) OVERRIDE; |
| 72 | 72 |
| 73 // WebVTTParserClient | 73 // WebVTTParserClient |
| 74 virtual void newCuesParsed() OVERRIDE; | 74 virtual void newCuesParsed() OVERRIDE; |
| 75 virtual void newRegionsParsed() OVERRIDE; | 75 virtual void newRegionsParsed() OVERRIDE; |
| 76 virtual void fileFailedToParse() OVERRIDE; | 76 virtual void fileFailedToParse() OVERRIDE; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 87 Document& m_document; | 87 Document& m_document; |
| 88 Timer<TextTrackLoader> m_cueLoadTimer; | 88 Timer<TextTrackLoader> m_cueLoadTimer; |
| 89 String m_crossOriginMode; | 89 String m_crossOriginMode; |
| 90 State m_state; | 90 State m_state; |
| 91 bool m_newCuesAvailable; | 91 bool m_newCuesAvailable; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace WebCore | 94 } // namespace WebCore |
| 95 | 95 |
| 96 #endif | 96 #endif |
| OLD | NEW |