| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 // ScriptWrappable overrides. | 83 // ScriptWrappable overrides. |
| 84 bool hasPendingActivity() const final; | 84 bool hasPendingActivity() const final; |
| 85 | 85 |
| 86 void createWriter(const FileEntry*, FileWriterCallback*, ErrorCallbackBase*); | 86 void createWriter(const FileEntry*, FileWriterCallback*, ErrorCallbackBase*); |
| 87 void createFile(const FileEntry*, BlobCallback*, ErrorCallbackBase*); | 87 void createFile(const FileEntry*, BlobCallback*, ErrorCallbackBase*); |
| 88 | 88 |
| 89 // Schedule a callback. This should not cross threads (should be called on the | 89 // Schedule a callback. This should not cross threads (should be called on the |
| 90 // same context thread). | 90 // same context thread). |
| 91 static void scheduleCallback(ExecutionContext* executionContext, | 91 static void scheduleCallback(ExecutionContext* executionContext, |
| 92 std::unique_ptr<ExecutionContextTask> task) { | 92 std::unique_ptr<WTF::Closure> task); |
| 93 DCHECK(executionContext->isContextThread()); | |
| 94 executionContext->postTask(TaskType::FileReading, BLINK_FROM_HERE, | |
| 95 std::move(task), taskNameForInstrumentation()); | |
| 96 } | |
| 97 | 93 |
| 98 DECLARE_VIRTUAL_TRACE(); | 94 DECLARE_VIRTUAL_TRACE(); |
| 99 | 95 |
| 100 private: | 96 private: |
| 101 DOMFileSystem(ExecutionContext*, | 97 DOMFileSystem(ExecutionContext*, |
| 102 const String& name, | 98 const String& name, |
| 103 FileSystemType, | 99 FileSystemType, |
| 104 const KURL& rootURL); | 100 const KURL& rootURL); |
| 105 | 101 |
| 106 static String taskNameForInstrumentation() { return "FileSystem"; } | 102 static String taskNameForInstrumentation() { return "FileSystem"; } |
| 107 | 103 |
| 108 int m_numberOfPendingCallbacks; | 104 int m_numberOfPendingCallbacks; |
| 109 Member<DirectoryEntry> m_rootEntry; | 105 Member<DirectoryEntry> m_rootEntry; |
| 110 }; | 106 }; |
| 111 | 107 |
| 112 } // namespace blink | 108 } // namespace blink |
| 113 | 109 |
| 114 #endif // DOMFileSystem_h | 110 #endif // DOMFileSystem_h |
| OLD | NEW |