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

Unified Diff: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h

Issue 2645613004: Provide a per-supplement implementation of LocalFileSystem.
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
diff --git a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
index 3979e6d34dcfa77621dd7a163bc36b4856b3a247..e4705c214f94d5685bd46d41fb48a5ea56474077 100644
--- a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
@@ -31,11 +31,7 @@
#ifndef LocalFileSystem_h
#define LocalFileSystem_h
-#include "core/frame/LocalFrame.h"
-#include "core/workers/WorkerClients.h"
#include "platform/FileSystemType.h"
-#include "platform/Supplementable.h"
-#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/Functional.h"
#include <memory>
@@ -49,35 +45,25 @@ class ExecutionContext;
class KURL;
class WebFileSystem;
-class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>,
- public Supplement<LocalFrame>,
- public Supplement<WorkerClients> {
- USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem);
+class LocalFileSystem {
WTF_MAKE_NONCOPYABLE(LocalFileSystem);
public:
- LocalFileSystem(LocalFrame&, std::unique_ptr<FileSystemClient>);
- LocalFileSystem(WorkerClients&, std::unique_ptr<FileSystemClient>);
- ~LocalFileSystem();
+ virtual ~LocalFileSystem();
- void resolveURL(ExecutionContext*,
- const KURL&,
- std::unique_ptr<AsyncFileSystemCallbacks>);
- void requestFileSystem(ExecutionContext*,
- FileSystemType,
- long long size,
- std::unique_ptr<AsyncFileSystemCallbacks>);
-
- FileSystemClient* client() const { return m_client.get(); }
+ virtual void resolveURL(ExecutionContext*,
+ const KURL&,
+ std::unique_ptr<AsyncFileSystemCallbacks>) = 0;
+ virtual void requestFileSystem(ExecutionContext*,
+ FileSystemType,
+ long long size,
+ std::unique_ptr<AsyncFileSystemCallbacks>) = 0;
static const char* supplementName();
static LocalFileSystem* from(ExecutionContext&);
- DECLARE_VIRTUAL_TRACE();
-
- private:
- WebFileSystem* getFileSystem() const;
- void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*);
+ protected:
+ explicit LocalFileSystem(std::unique_ptr<FileSystemClient>);
void requestFileSystemAccessInternal(ExecutionContext*,
std::unique_ptr<WTF::Closure> allowed,
@@ -88,6 +74,12 @@ class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>,
CallbackWrapper*);
void resolveURLInternal(ExecutionContext*, const KURL&, CallbackWrapper*);
+ private:
+ FileSystemClient* client() const { return m_client.get(); }
+
+ WebFileSystem* getFileSystem() const;
+ void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*);
+
std::unique_ptr<FileSystemClient> m_client;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698