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 29 matching lines...) Expand all Loading... |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class AsyncFileSystemCallbacks; | 42 class AsyncFileSystemCallbacks; |
43 class CallbackWrapper; | 43 class CallbackWrapper; |
44 class FileSystemClient; | 44 class FileSystemClient; |
45 class ExecutionContext; | 45 class ExecutionContext; |
46 class KURL; | 46 class KURL; |
47 class LocalFrame; | 47 class LocalFrame; |
48 class WebFileSystem; | 48 class WebFileSystem; |
49 | 49 |
50 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>,
public HeapSupplement<LocalFrame>, public HeapSupplement<WorkerClients> { | 50 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>,
public Supplement<LocalFrame>, public Supplement<WorkerClients> { |
51 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); | 51 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); |
52 WTF_MAKE_NONCOPYABLE(LocalFileSystem); | 52 WTF_MAKE_NONCOPYABLE(LocalFileSystem); |
53 public: | 53 public: |
54 static RawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>); | 54 static RawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>); |
55 virtual ~LocalFileSystem(); | 55 virtual ~LocalFileSystem(); |
56 | 56 |
57 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa
llbacks>); | 57 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa
llbacks>); |
58 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa
ssOwnPtr<AsyncFileSystemCallbacks>); | 58 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa
ssOwnPtr<AsyncFileSystemCallbacks>); |
59 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil
eSystemCallbacks>); | 59 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil
eSystemCallbacks>); |
60 | 60 |
61 FileSystemClient* client() { return m_client.get(); } | 61 FileSystemClient* client() { return m_client.get(); } |
62 | 62 |
63 static const char* supplementName(); | 63 static const char* supplementName(); |
64 static LocalFileSystem* from(ExecutionContext&); | 64 static LocalFileSystem* from(ExecutionContext&); |
65 | 65 |
66 DEFINE_INLINE_VIRTUAL_TRACE() | 66 DEFINE_INLINE_VIRTUAL_TRACE() |
67 { | 67 { |
68 HeapSupplement<LocalFrame>::trace(visitor); | 68 Supplement<LocalFrame>::trace(visitor); |
69 HeapSupplement<WorkerClients>::trace(visitor); | 69 Supplement<WorkerClients>::trace(visitor); |
70 } | 70 } |
71 | 71 |
72 protected: | 72 protected: |
73 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); | 73 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); |
74 | 74 |
75 private: | 75 private: |
76 WebFileSystem* fileSystem() const; | 76 WebFileSystem* fileSystem() const; |
77 void requestFileSystemAccessInternal(ExecutionContext*, PassOwnPtr<SameThrea
dClosure> allowed, PassOwnPtr<SameThreadClosure> denied); | 77 void requestFileSystemAccessInternal(ExecutionContext*, PassOwnPtr<SameThrea
dClosure> allowed, PassOwnPtr<SameThreadClosure> denied); |
78 void fileSystemNotAvailable(RawPtr<ExecutionContext>, CallbackWrapper*); | 78 void fileSystemNotAvailable(RawPtr<ExecutionContext>, CallbackWrapper*); |
79 void fileSystemNotAllowedInternal(RawPtr<ExecutionContext>, CallbackWrapper*
); | 79 void fileSystemNotAllowedInternal(RawPtr<ExecutionContext>, CallbackWrapper*
); |
80 void fileSystemAllowedInternal(RawPtr<ExecutionContext>, FileSystemType, Cal
lbackWrapper*); | 80 void fileSystemAllowedInternal(RawPtr<ExecutionContext>, FileSystemType, Cal
lbackWrapper*); |
81 void resolveURLInternal(RawPtr<ExecutionContext>, const KURL&, CallbackWrapp
er*); | 81 void resolveURLInternal(RawPtr<ExecutionContext>, const KURL&, CallbackWrapp
er*); |
82 void deleteFileSystemInternal(RawPtr<ExecutionContext>, FileSystemType, Call
backWrapper*); | 82 void deleteFileSystemInternal(RawPtr<ExecutionContext>, FileSystemType, Call
backWrapper*); |
83 OwnPtr<FileSystemClient> m_client; | 83 OwnPtr<FileSystemClient> m_client; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
87 | 87 |
88 #endif // LocalFileSystem_h | 88 #endif // LocalFileSystem_h |
OLD | NEW |