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

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

Issue 2614143002: Use a new Supplement constructor for LocalFrame's supplements (Closed)
Patch Set: Created 3 years, 11 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class KURL; 49 class KURL;
50 class WebFileSystem; 50 class WebFileSystem;
51 51
52 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>, 52 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>,
53 public Supplement<LocalFrame>, 53 public Supplement<LocalFrame>,
54 public Supplement<WorkerClients> { 54 public Supplement<WorkerClients> {
55 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); 55 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem);
56 WTF_MAKE_NONCOPYABLE(LocalFileSystem); 56 WTF_MAKE_NONCOPYABLE(LocalFileSystem);
57 57
58 public: 58 public:
59 static LocalFileSystem* create(std::unique_ptr<FileSystemClient>); 59 LocalFileSystem(LocalFrame&, std::unique_ptr<FileSystemClient>);
60 LocalFileSystem(WorkerClients&, std::unique_ptr<FileSystemClient>);
60 ~LocalFileSystem(); 61 ~LocalFileSystem();
61 62
62 void resolveURL(ExecutionContext*, 63 void resolveURL(ExecutionContext*,
63 const KURL&, 64 const KURL&,
64 std::unique_ptr<AsyncFileSystemCallbacks>); 65 std::unique_ptr<AsyncFileSystemCallbacks>);
65 void requestFileSystem(ExecutionContext*, 66 void requestFileSystem(ExecutionContext*,
66 FileSystemType, 67 FileSystemType,
67 long long size, 68 long long size,
68 std::unique_ptr<AsyncFileSystemCallbacks>); 69 std::unique_ptr<AsyncFileSystemCallbacks>);
69 void deleteFileSystem(ExecutionContext*, 70 void deleteFileSystem(ExecutionContext*,
70 FileSystemType, 71 FileSystemType,
71 std::unique_ptr<AsyncFileSystemCallbacks>); 72 std::unique_ptr<AsyncFileSystemCallbacks>);
72 73
73 FileSystemClient* client() const { return m_client.get(); } 74 FileSystemClient* client() const { return m_client.get(); }
74 75
75 static const char* supplementName(); 76 static const char* supplementName();
76 static LocalFileSystem* from(ExecutionContext&); 77 static LocalFileSystem* from(ExecutionContext&);
77 78
78 DECLARE_VIRTUAL_TRACE(); 79 DECLARE_VIRTUAL_TRACE();
79 80
80 private: 81 private:
81 explicit LocalFileSystem(std::unique_ptr<FileSystemClient>);
82
83 WebFileSystem* getFileSystem() const; 82 WebFileSystem* getFileSystem() const;
84 void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*); 83 void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*);
85 84
86 void requestFileSystemAccessInternal(ExecutionContext*, 85 void requestFileSystemAccessInternal(ExecutionContext*,
87 std::unique_ptr<WTF::Closure> allowed, 86 std::unique_ptr<WTF::Closure> allowed,
88 std::unique_ptr<WTF::Closure> denied); 87 std::unique_ptr<WTF::Closure> denied);
89 void fileSystemNotAllowedInternal(ExecutionContext*, CallbackWrapper*); 88 void fileSystemNotAllowedInternal(ExecutionContext*, CallbackWrapper*);
90 void fileSystemAllowedInternal(ExecutionContext*, 89 void fileSystemAllowedInternal(ExecutionContext*,
91 FileSystemType, 90 FileSystemType,
92 CallbackWrapper*); 91 CallbackWrapper*);
93 void resolveURLInternal(ExecutionContext*, const KURL&, CallbackWrapper*); 92 void resolveURLInternal(ExecutionContext*, const KURL&, CallbackWrapper*);
94 void deleteFileSystemInternal(ExecutionContext*, 93 void deleteFileSystemInternal(ExecutionContext*,
95 FileSystemType, 94 FileSystemType,
96 CallbackWrapper*); 95 CallbackWrapper*);
97 96
98 std::unique_ptr<FileSystemClient> m_client; 97 std::unique_ptr<FileSystemClient> m_client;
99 }; 98 };
100 99
101 } // namespace blink 100 } // namespace blink
102 101
103 #endif // LocalFileSystem_h 102 #endif // LocalFileSystem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698