Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: Source/modules/filesystem/LocalFileSystem.h

Issue 324483002: Move LocalFileSystem to hang off LocalFrame instead of Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update per haraken Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 NoBaseWillBeGarbageCollectedFinalized<Local FileSystem>, public Supplement<LocalFrame>, public WillBeHeapSupplement<WorkerCl ients> {
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); 49 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem);
49 WTF_MAKE_NONCOPYABLE(LocalFileSystem); 50 WTF_MAKE_NONCOPYABLE(LocalFileSystem);
50 public: 51 public:
51 static PassOwnPtrWillBeRawPtr<LocalFileSystem> create(PassOwnPtr<FileSystemC lient>); 52 static PassOwnPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>);
52 virtual ~LocalFileSystem(); 53 virtual ~LocalFileSystem();
53 54
54 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); 55 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>);
55 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); 56 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>);
56 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); 57 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>);
57 58
58 FileSystemClient* client() { return m_client.get(); } 59 FileSystemClient* client() { return m_client.get(); }
59 60
60 static const char* supplementName(); 61 static const char* supplementName();
61 static LocalFileSystem* from(ExecutionContext&); 62 static LocalFileSystem* from(ExecutionContext&);
62 63
63 virtual void trace(Visitor* visitor) OVERRIDE 64 virtual void trace(Visitor* visitor) OVERRIDE
64 { 65 {
65 WillBeHeapSupplement<Page>::trace(visitor);
66 WillBeHeapSupplement<WorkerClients>::trace(visitor); 66 WillBeHeapSupplement<WorkerClients>::trace(visitor);
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698