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 17 matching lines...) Expand all Loading... | |
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" | 34 #include "core/page/Page.h" |
35 #include "core/workers/WorkerClients.h" | 35 #include "core/workers/WorkerClients.h" |
36 #include "platform/FileSystemType.h" | 36 #include "platform/FileSystemType.h" |
37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
38 #include "wtf/Functional.h" | |
38 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 | 41 |
41 class AsyncFileSystemCallbacks; | 42 class AsyncFileSystemCallbacks; |
42 class FileSystemClient; | 43 class FileSystemClient; |
43 class ExecutionContext; | 44 class ExecutionContext; |
44 | 45 |
45 class LocalFileSystem FINAL : public NoBaseWillBeGarbageCollectedFinalized<Local FileSystem>, public WillBeHeapSupplement<Page>, public WillBeHeapSupplement<Work erClients> { | 46 class LocalFileSystem FINAL : public NoBaseWillBeGarbageCollectedFinalized<Local FileSystem>, public WillBeHeapSupplement<Page>, public WillBeHeapSupplement<Work erClients> { |
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); | 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); |
47 WTF_MAKE_NONCOPYABLE(LocalFileSystem); | 48 WTF_MAKE_NONCOPYABLE(LocalFileSystem); |
48 public: | 49 public: |
49 static PassOwnPtrWillBeRawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemC lient>); | 50 static PassOwnPtrWillBeRawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemC lient>); |
50 virtual ~LocalFileSystem(); | 51 virtual ~LocalFileSystem(); |
51 | 52 |
52 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); | 53 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); |
53 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); | 54 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); |
54 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); | 55 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); |
55 | 56 |
56 FileSystemClient* client() { return m_client.get(); } | 57 FileSystemClient* client() { return m_client.get(); } |
57 | 58 |
58 static const char* supplementName(); | 59 static const char* supplementName(); |
59 static LocalFileSystem* from(ExecutionContext&); | 60 static LocalFileSystem* from(ExecutionContext&); |
60 | 61 |
61 virtual void trace(Visitor* visitor) OVERRIDE | 62 virtual void trace(Visitor* visitor) OVERRIDE |
62 { | 63 { |
63 WillBeHeapSupplement<Page>::trace(visitor); | 64 WillBeHeapSupplement<Page>::trace(visitor); |
64 WillBeHeapSupplement<WorkerClients>::trace(visitor); | 65 WillBeHeapSupplement<WorkerClients>::trace(visitor); |
65 } | 66 } |
66 | |
67 protected: | 67 protected: |
68 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); | 68 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); |
69 | 69 |
70 OwnPtr<FileSystemClient> m_client; | 70 OwnPtr<FileSystemClient> m_client; |
kinuko
2014/05/21 07:24:24
I think this one should be in the private: section
Xi Han
2014/05/21 19:50:05
Done.
| |
71 private: | |
72 void fileSystemNotAllowedInternal(PassRefPtr<ExecutionContext>, PassOwnPtr<A syncFileSystemCallbacks>); | |
73 void fileSystemAllowedInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassOwnPtr<AsyncFileSystemCallbacks>); | |
74 void resolveURLInternal(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>); | |
75 void deleteFileSystemInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassOwnPtr<AsyncFileSystemCallbacks>); | |
76 void requestFileSystemAccesssAsyncInternal(PassRefPtr<ExecutionContext>, con st Closure&, const Closure&); | |
71 }; | 77 }; |
72 | 78 |
73 } // namespace WebCore | 79 } // namespace WebCore |
74 | 80 |
75 #endif // LocalFileSystem_h | 81 #endif // LocalFileSystem_h |
OLD | NEW |