Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: Source/core/loader/TextTrackLoader.h

Issue 52533003: Refactor TextTrackLoader to properly use the dataReceived callback (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cachedCueData
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE; 73 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE;
74 virtual void notifyFinished(Resource*) OVERRIDE; 74 virtual void notifyFinished(Resource*) OVERRIDE;
75 75
76 // WebVTTParserClient 76 // WebVTTParserClient
77 virtual void newCuesParsed() OVERRIDE; 77 virtual void newCuesParsed() OVERRIDE;
78 virtual void newRegionsParsed() OVERRIDE; 78 virtual void newRegionsParsed() OVERRIDE;
79 virtual void fileFailedToParse() OVERRIDE; 79 virtual void fileFailedToParse() OVERRIDE;
80 80
81 TextTrackLoader(TextTrackLoaderClient*, Document&); 81 TextTrackLoader(TextTrackLoaderClient*, Document&);
82 82
83 void processNewCueData(Resource*);
84 void cueLoadTimerFired(Timer<TextTrackLoader>*); 83 void cueLoadTimerFired(Timer<TextTrackLoader>*);
85 void corsPolicyPreventedLoad(); 84 void corsPolicyPreventedLoad();
86 85
87 TextTrackLoaderClient* m_client; 86 TextTrackLoaderClient* m_client;
88 OwnPtr<WebVTTParser> m_cueParser; 87 OwnPtr<WebVTTParser> m_cueParser;
89 ResourcePtr<TextTrackResource> m_resource; 88 ResourcePtr<TextTrackResource> m_resource;
90 // FIXME: Remove this pointer and get the Document from m_client. 89 // FIXME: Remove this pointer and get the Document from m_client.
91 Document& m_document; 90 Document& m_document;
92 Timer<TextTrackLoader> m_cueLoadTimer; 91 Timer<TextTrackLoader> m_cueLoadTimer;
93 String m_crossOriginMode; 92 String m_crossOriginMode;
94 State m_state; 93 State m_state;
95 unsigned m_parseOffset;
96 bool m_newCuesAvailable; 94 bool m_newCuesAvailable;
97 }; 95 };
98 96
99 } // namespace WebCore 97 } // namespace WebCore
100 98
101 #endif 99 #endif
OLDNEW
« no previous file with comments | « LayoutTests/media/track/opera/track/webvtt/parsing/001-expected.txt ('k') | Source/core/loader/TextTrackLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698