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