Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef LocalFileSystem_h | 31 #ifndef LocalFileSystem_h |
| 32 #define LocalFileSystem_h | 32 #define LocalFileSystem_h |
| 33 | 33 |
| 34 #include "core/page/Page.h" | |
| 35 #include "core/workers/WorkerClients.h" | 34 #include "core/workers/WorkerClients.h" |
| 36 #include "platform/FileSystemType.h" | 35 #include "platform/FileSystemType.h" |
| 37 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 38 #include "wtf/Functional.h" | 37 #include "wtf/Functional.h" |
| 39 | 38 |
| 40 namespace WebCore { | 39 namespace WebCore { |
| 41 | 40 |
| 42 class AsyncFileSystemCallbacks; | 41 class AsyncFileSystemCallbacks; |
| 43 class CallbackWrapper; | 42 class CallbackWrapper; |
| 44 class FileSystemClient; | 43 class FileSystemClient; |
| 45 class ExecutionContext; | 44 class ExecutionContext; |
| 45 class KURL; | |
| 46 class LocalFrame; | |
| 46 | 47 |
| 47 class LocalFileSystem FINAL : public NoBaseWillBeGarbageCollectedFinalized<Local FileSystem>, public WillBeHeapSupplement<Page>, public WillBeHeapSupplement<Work erClients> { | 48 class LocalFileSystem FINAL : public Supplement<LocalFrame>, public Supplement<W orkerClients> { |
|
haraken
2014/06/07 02:33:16
Ian (or oilpan experts): WorkerClients is already
| |
| 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); | |
| 49 WTF_MAKE_NONCOPYABLE(LocalFileSystem); | 49 WTF_MAKE_NONCOPYABLE(LocalFileSystem); |
| 50 public: | 50 public: |
| 51 static PassOwnPtrWillBeRawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemC lient>); | 51 static PassOwnPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>); |
| 52 virtual ~LocalFileSystem(); | 52 virtual ~LocalFileSystem(); |
| 53 | 53 |
| 54 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); | 54 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); |
| 55 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); | 55 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); |
| 56 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); | 56 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); |
| 57 | 57 |
| 58 FileSystemClient* client() { return m_client.get(); } | 58 FileSystemClient* client() { return m_client.get(); } |
| 59 | 59 |
| 60 static const char* supplementName(); | 60 static const char* supplementName(); |
| 61 static LocalFileSystem* from(ExecutionContext&); | 61 static LocalFileSystem* from(ExecutionContext&); |
| 62 | 62 |
| 63 virtual void trace(Visitor* visitor) OVERRIDE | 63 virtual void trace(Visitor* visitor) OVERRIDE |
| 64 { | 64 { |
| 65 WillBeHeapSupplement<Page>::trace(visitor); | 65 WillBeHeapSupplement<LocalFrame>::trace(visitor); |
|
sof
2014/06/06 20:32:41
s/WillBeHeapSupplement/Supplement/
| |
| 66 WillBeHeapSupplement<WorkerClients>::trace(visitor); | 66 WillBeHeapSupplement<WorkerClients>::trace(visitor); |
|
sof
2014/06/06 20:32:41
s/WillBeHeapSupplement/Supplement/
| |
| 67 } | 67 } |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); | 70 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 void requestFileSystemAccessInternal(ExecutionContext*, const Closure& allow ed, const Closure& denied); | 73 void requestFileSystemAccessInternal(ExecutionContext*, const Closure& allow ed, const Closure& denied); |
| 74 void fileSystemNotAllowedInternal(PassRefPtr<ExecutionContext>, PassRefPtr<C allbackWrapper>); | 74 void fileSystemNotAllowedInternal(PassRefPtr<ExecutionContext>, PassRefPtr<C allbackWrapper>); |
| 75 void fileSystemAllowedInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<CallbackWrapper>); | 75 void fileSystemAllowedInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<CallbackWrapper>); |
| 76 void resolveURLInternal(const KURL&, PassRefPtr<CallbackWrapper>); | 76 void resolveURLInternal(const KURL&, PassRefPtr<CallbackWrapper>); |
| 77 void deleteFileSystemInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<CallbackWrapper>); | 77 void deleteFileSystemInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<CallbackWrapper>); |
| 78 OwnPtr<FileSystemClient> m_client; | 78 OwnPtr<FileSystemClient> m_client; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace WebCore | 81 } // namespace WebCore |
| 82 | 82 |
| 83 #endif // LocalFileSystem_h | 83 #endif // LocalFileSystem_h |
| OLD | NEW |