Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 20 matching lines...) Expand all Loading... | |
| 31 #ifndef FileSystemClient_h | 31 #ifndef FileSystemClient_h |
| 32 #define FileSystemClient_h | 32 #define FileSystemClient_h |
| 33 | 33 |
| 34 #include "modules/filesystem/FileSystemType.h" | 34 #include "modules/filesystem/FileSystemType.h" |
| 35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
| 36 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class AsyncFileSystemCallbacks; | 40 class AsyncFileSystemCallbacks; |
| 41 class KURL; | |
|
kinuko
2013/09/12 10:55:59
Not necessary any more?
nhiroki
2013/09/13 07:33:44
Done.
| |
| 41 class Page; | 42 class Page; |
| 42 class ScriptExecutionContext; | 43 class ScriptExecutionContext; |
| 43 class WorkerClients; | 44 class WorkerClients; |
| 44 | 45 |
| 45 enum OpenFileSystemMode { | 46 enum OpenFileSystemMode { |
| 46 OpenExistingFileSystem, | 47 OpenExistingFileSystem, |
| 47 CreateFileSystemIfNotPresent | 48 CreateFileSystemIfNotPresent |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 class FileSystemClient { | 51 class FileSystemClient { |
| 51 WTF_MAKE_NONCOPYABLE(FileSystemClient); | 52 WTF_MAKE_NONCOPYABLE(FileSystemClient); |
| 52 public: | 53 public: |
| 53 FileSystemClient() { } | 54 FileSystemClient() { } |
| 54 virtual ~FileSystemClient() { } | 55 virtual ~FileSystemClient() { } |
| 55 | 56 |
| 56 virtual bool allowFileSystem(ScriptExecutionContext*) = 0; | 57 virtual bool allowFileSystem(ScriptExecutionContext*) = 0; |
| 57 | 58 |
| 58 // FIXME: move these methods to platform. | 59 // FIXME: move these methods to platform. |
| 59 virtual void openFileSystem(ScriptExecutionContext*, FileSystemType, PassOwn Ptr<AsyncFileSystemCallbacks>, long long size, OpenFileSystemMode) = 0; | 60 virtual void openFileSystem(ScriptExecutionContext*, FileSystemType, PassOwn Ptr<AsyncFileSystemCallbacks>, long long size, OpenFileSystemMode) = 0; |
| 60 virtual void deleteFileSystem(ScriptExecutionContext*, FileSystemType, PassO wnPtr<AsyncFileSystemCallbacks>) = 0; | 61 virtual void deleteFileSystem(ScriptExecutionContext*, FileSystemType, PassO wnPtr<AsyncFileSystemCallbacks>) = 0; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 void provideLocalFileSystemTo(Page*, PassOwnPtr<FileSystemClient>); | 64 void provideLocalFileSystemTo(Page*, PassOwnPtr<FileSystemClient>); |
| 64 | 65 |
| 65 void provideLocalFileSystemToWorker(WorkerClients*, PassOwnPtr<FileSystemClient> ); | 66 void provideLocalFileSystemToWorker(WorkerClients*, PassOwnPtr<FileSystemClient> ); |
| 66 | 67 |
| 67 } // namespace WebCore | 68 } // namespace WebCore |
| 68 | 69 |
| 69 #endif // FileSystemClient_h | 70 #endif // FileSystemClient_h |
| OLD | NEW |