Chromium Code Reviews| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 class TextTrackLoaderClient { | 42 class TextTrackLoaderClient { |
| 43 public: | 43 public: |
| 44 virtual ~TextTrackLoaderClient() {} | 44 virtual ~TextTrackLoaderClient() {} |
| 45 | 45 |
| 46 virtual void newCuesAvailable(TextTrackLoader*) = 0; | 46 virtual void newCuesAvailable(TextTrackLoader*) = 0; |
| 47 virtual void cueLoadingCompleted(TextTrackLoader*, bool loadingFailed) = 0; | 47 virtual void cueLoadingCompleted(TextTrackLoader*, bool loadingFailed) = 0; |
| 48 virtual void newRegionsAvailable(TextTrackLoader*) = 0; | 48 virtual void newRegionsAvailable(TextTrackLoader*) = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 class TextTrackLoader final : public NoBaseWillBeGarbageCollectedFinalized<TextT rackLoader>, public ResourceOwner<RawResource>, private VTTParserClient { | 51 class TextTrackLoader final : public NoBaseWillBeGarbageCollectedFinalized<TextT rackLoader>, public ResourceOwner<RawResource>, private VTTParserClient { |
| 52 WTF_MAKE_NONCOPYABLE(TextTrackLoader); | |
| 53 USING_FAST_MALLOC_WILL_BE_REMOVED(TextTrackLoader); | 52 USING_FAST_MALLOC_WILL_BE_REMOVED(TextTrackLoader); |
| 53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TextTrackLoader); | |
| 54 public: | 54 public: |
| 55 static PassOwnPtrWillBeRawPtr<TextTrackLoader> create(TextTrackLoaderClient& client, Document& document) | 55 static PassOwnPtrWillBeRawPtr<TextTrackLoader> create(TextTrackLoaderClient& client, Document& document) |
| 56 { | 56 { |
| 57 return adoptPtrWillBeNoop(new TextTrackLoader(client, document)); | 57 return adoptPtrWillBeNoop(new TextTrackLoader(client, document)); |
| 58 } | 58 } |
| 59 ~TextTrackLoader() override; | 59 ~TextTrackLoader() override; |
| 60 | 60 |
| 61 bool load(const KURL&, CrossOriginAttributeValue); | 61 bool load(const KURL&, CrossOriginAttributeValue); |
| 62 void cancelLoad(); | 62 void cancelLoad(); |
| 63 | 63 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 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; |
|
haraken
2016/01/12 00:22:52
It would be better to make TextTrackLoaderClient a
| |
| 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 |