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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Creates a WebFileWriter that can be used to write to the given file. | 141 // Creates a WebFileWriter that can be used to write to the given file. |
142 // WebFileSystemCallbacks::didCreateFileWriter() must be called with the cre
ated WebFileWriter when the operation is completed successfully. | 142 // WebFileSystemCallbacks::didCreateFileWriter() must be called with the cre
ated WebFileWriter when the operation is completed successfully. |
143 // WebFileSystemCallbacks::didFail() must be called otherwise. | 143 // WebFileSystemCallbacks::didFail() must be called otherwise. |
144 virtual void createFileWriter(const WebURL& path, WebFileWriterClient*, WebF
ileSystemCallbacks) { BLINK_ASSERT_NOT_REACHED(); } | 144 virtual void createFileWriter(const WebURL& path, WebFileWriterClient*, WebF
ileSystemCallbacks) { BLINK_ASSERT_NOT_REACHED(); } |
145 | 145 |
146 // Creates a snapshot file for a given file specified by |path|. It returns
the metadata of the created snapshot file. | 146 // Creates a snapshot file for a given file specified by |path|. It returns
the metadata of the created snapshot file. |
147 // The returned metadata should include a local platform path to the snapsho
t image. | 147 // The returned metadata should include a local platform path to the snapsho
t image. |
148 // In local filesystem cases the backend may simply return the metadata of t
he file itself (as well as readMetadata does), while in | 148 // In local filesystem cases the backend may simply return the metadata of t
he file itself (as well as readMetadata does), while in |
149 // remote filesystem case the backend may download the file into a temporary
snapshot file and return the metadata of the temporary file. | 149 // remote filesystem case the backend may download the file into a temporary
snapshot file and return the metadata of the temporary file. |
150 // The returned metadata is used to create a File object for the |path|. | 150 // The returned metadata is used to create a File object for the |path|. |
151 // The snapshot file is supposed to be deleted when the last reference to a
WebCore::File referring to it's path is dropped. | 151 // The snapshot file is supposed to be deleted when the last reference to a
blink::File referring to it's path is dropped. |
152 // WebFileSystemCallbacks::didCreateSnapshotFile() with the metadata of the
snapshot file must be called when the operation is completed successfully. | 152 // WebFileSystemCallbacks::didCreateSnapshotFile() with the metadata of the
snapshot file must be called when the operation is completed successfully. |
153 // WebFileSystemCallbacks::didFail() must be called otherwise. | 153 // WebFileSystemCallbacks::didFail() must be called otherwise. |
154 virtual void createSnapshotFileAndReadMetadata(const WebURL& path, WebFileSy
stemCallbacks) { BLINK_ASSERT_NOT_REACHED(); } | 154 virtual void createSnapshotFileAndReadMetadata(const WebURL& path, WebFileSy
stemCallbacks) { BLINK_ASSERT_NOT_REACHED(); } |
155 | 155 |
156 // Waits for additional results returned for the method call and returns tru
e if possible. | 156 // Waits for additional results returned for the method call and returns tru
e if possible. |
157 // Returns false if there is no running method call corresponding for the gi
ven ID. | 157 // Returns false if there is no running method call corresponding for the gi
ven ID. |
158 // |callbacksId| must be the value returned by the original method call. | 158 // |callbacksId| must be the value returned by the original method call. |
159 virtual bool waitForAdditionalResult(int callbacksId) { BLINK_ASSERT_NOT_REA
CHED(); return false; } | 159 virtual bool waitForAdditionalResult(int callbacksId) { BLINK_ASSERT_NOT_REA
CHED(); return false; } |
160 | 160 |
161 protected: | 161 protected: |
162 virtual ~WebFileSystem() { } | 162 virtual ~WebFileSystem() { } |
163 }; | 163 }; |
164 | 164 |
165 } // namespace blink | 165 } // namespace blink |
166 | 166 |
167 #endif | 167 #endif |
OLD | NEW |