OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 static const char* supplementName() { return "FileReaderThrottlingController
"; } | 212 static const char* supplementName() { return "FileReaderThrottlingController
"; } |
213 | 213 |
214 const size_t m_maxRunningReaders; | 214 const size_t m_maxRunningReaders; |
215 FileReaderDeque m_pendingReaders; | 215 FileReaderDeque m_pendingReaders; |
216 FileReaderHashSet m_runningReaders; | 216 FileReaderHashSet m_runningReaders; |
217 }; | 217 }; |
218 | 218 |
219 FileReader* FileReader::create(ExecutionContext* context) | 219 FileReader* FileReader::create(ExecutionContext* context) |
220 { | 220 { |
221 FileReader* fileReader = adoptRefCountedGarbageCollectedWillBeNoop(new FileR
eader(context)); | 221 FileReader* fileReader = new FileReader(context); |
222 fileReader->suspendIfNeeded(); | 222 fileReader->suspendIfNeeded(); |
223 return fileReader; | 223 return fileReader; |
224 } | 224 } |
225 | 225 |
226 FileReader::FileReader(ExecutionContext* context) | 226 FileReader::FileReader(ExecutionContext* context) |
227 : ActiveDOMObject(context) | 227 : ActiveDOMObject(context) |
228 , m_state(EMPTY) | 228 , m_state(EMPTY) |
229 , m_loadingState(LoadingStateNone) | 229 , m_loadingState(LoadingStateNone) |
230 , m_readType(FileReaderLoader::ReadAsBinaryString) | 230 , m_readType(FileReaderLoader::ReadAsBinaryString) |
231 , m_lastProgressNotificationTimeMS(0) | 231 , m_lastProgressNotificationTimeMS(0) |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 return m_loader->stringResult(); | 484 return m_loader->stringResult(); |
485 } | 485 } |
486 | 486 |
487 void FileReader::trace(Visitor* visitor) | 487 void FileReader::trace(Visitor* visitor) |
488 { | 488 { |
489 visitor->trace(m_error); | 489 visitor->trace(m_error); |
490 EventTargetWithInlineData::trace(visitor); | 490 EventTargetWithInlineData::trace(visitor); |
491 } | 491 } |
492 | 492 |
493 } // namespace blink | 493 } // namespace blink |
OLD | NEW |