| 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 30 matching lines...) Expand all Loading... |
| 41 class FileSystemClient; | 41 class FileSystemClient; |
| 42 class ScriptExecutionContext; | 42 class ScriptExecutionContext; |
| 43 | 43 |
| 44 // Base class of LocalFileSystem and WorkerLocalFileSystem. | 44 // Base class of LocalFileSystem and WorkerLocalFileSystem. |
| 45 class LocalFileSystemBase { | 45 class LocalFileSystemBase { |
| 46 WTF_MAKE_NONCOPYABLE(LocalFileSystemBase); | 46 WTF_MAKE_NONCOPYABLE(LocalFileSystemBase); |
| 47 public: | 47 public: |
| 48 virtual ~LocalFileSystemBase(); | 48 virtual ~LocalFileSystemBase(); |
| 49 | 49 |
| 50 // Does not create the new file system if it doesn't exist, just reads it if
available. | 50 // Does not create the new file system if it doesn't exist, just reads it if
available. |
| 51 void readFileSystem(ScriptExecutionContext*, FileSystemType, PassOwnPtr<Asyn
cFileSystemCallbacks>); | 51 void readFileSystem(ScriptExecutionContext*, KURL, PassOwnPtr<AsyncFileSyste
mCallbacks>); |
| 52 | 52 |
| 53 void requestFileSystem(ScriptExecutionContext*, FileSystemType, long long si
ze, PassOwnPtr<AsyncFileSystemCallbacks>); | 53 void requestFileSystem(ScriptExecutionContext*, FileSystemType, long long si
ze, PassOwnPtr<AsyncFileSystemCallbacks>); |
| 54 | 54 |
| 55 void deleteFileSystem(ScriptExecutionContext*, FileSystemType, PassOwnPtr<As
yncFileSystemCallbacks>); | 55 void deleteFileSystem(ScriptExecutionContext*, FileSystemType, PassOwnPtr<As
yncFileSystemCallbacks>); |
| 56 | 56 |
| 57 FileSystemClient* client() { return m_client.get(); } | 57 FileSystemClient* client() { return m_client.get(); } |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 explicit LocalFileSystemBase(PassOwnPtr<FileSystemClient>); | 60 explicit LocalFileSystemBase(PassOwnPtr<FileSystemClient>); |
| 61 | 61 |
| 62 OwnPtr<FileSystemClient> m_client; | 62 OwnPtr<FileSystemClient> m_client; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 class LocalFileSystem : public LocalFileSystemBase, public Supplement<Page> { | 65 class LocalFileSystem : public LocalFileSystemBase, public Supplement<Page> { |
| 66 public: | 66 public: |
| 67 static PassOwnPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>); | 67 static PassOwnPtr<LocalFileSystem> create(PassOwnPtr<FileSystemClient>); |
| 68 static const char* supplementName(); | 68 static const char* supplementName(); |
| 69 static LocalFileSystem* from(ScriptExecutionContext*); | 69 static LocalFileSystem* from(ScriptExecutionContext*); |
| 70 virtual ~LocalFileSystem(); | 70 virtual ~LocalFileSystem(); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); | 73 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 | 76 |
| 77 } // namespace WebCore | 77 } // namespace WebCore |
| 78 | 78 |
| 79 #endif // LocalFileSystem_h | 79 #endif // LocalFileSystem_h |
| OLD | NEW |