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

Side by Side Diff: public/platform/WebFileSystemCallbacks.h

Issue 23537011: FileAPI: Add WebFileSystem::resolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 7 years, 3 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebFileSystemCallbacks_h 31 #ifndef WebFileSystemCallbacks_h
32 #define WebFileSystemCallbacks_h 32 #define WebFileSystemCallbacks_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebFileError.h" 35 #include "WebFileError.h"
36 #include "WebFileSystemEntry.h" 36 #include "WebFileSystemEntry.h"
37 #include "WebFileSystemType.h"
37 #include "WebPrivatePtr.h" 38 #include "WebPrivatePtr.h"
38 #include "WebVector.h" 39 #include "WebVector.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 class AsyncFileSystemCallbacks; 42 class AsyncFileSystemCallbacks;
42 } 43 }
43 namespace WTF { template <typename T> class PassOwnPtr; } 44 namespace WTF { template <typename T> class PassOwnPtr; }
44 45
45 namespace WebKit { 46 namespace WebKit {
46 47
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Callback for WebFileSystem::readDirectory. Called with a vector of 84 // Callback for WebFileSystem::readDirectory. Called with a vector of
84 // file entries in the requested directory. This callback might be called 85 // file entries in the requested directory. This callback might be called
85 // multiple times if the directory has many entries. |hasMore| must be 86 // multiple times if the directory has many entries. |hasMore| must be
86 // true when there are more entries. 87 // true when there are more entries.
87 WEBKIT_EXPORT void didReadDirectory(const WebVector<WebFileSystemEntry>&, bo ol hasMore); 88 WEBKIT_EXPORT void didReadDirectory(const WebVector<WebFileSystemEntry>&, bo ol hasMore);
88 89
89 // Callback for WebFileSystem::openFileSystem. Called with a name and 90 // Callback for WebFileSystem::openFileSystem. Called with a name and
90 // root URL for the FileSystem when the request is accepted. 91 // root URL for the FileSystem when the request is accepted.
91 WEBKIT_EXPORT void didOpenFileSystem(const WebString& name, const WebURL& ro otURL); 92 WEBKIT_EXPORT void didOpenFileSystem(const WebString& name, const WebURL& ro otURL);
92 93
94 // Callback for WebFileSystem::resolveURL. Called with a name, root URL and
95 // file path for the FileSystem when the request is accepted. |isDirectory|
96 // must be true when an entry to be resolved is a directory.
97 WEBKIT_EXPORT void didResolveURL(const WebString& name, const WebURL& rootUR L, WebFileSystemType, const WebString& filePath, bool isDirectory);
98
93 // Callback for WebFileSystem::createFileWriter. Called with an instance 99 // Callback for WebFileSystem::createFileWriter. Called with an instance
94 // of WebFileWriter and the target file length. The writer's ownership 100 // of WebFileWriter and the target file length. The writer's ownership
95 // is transferred to the callback. 101 // is transferred to the callback.
96 WEBKIT_EXPORT void didCreateFileWriter(WebFileWriter*, long long length); 102 WEBKIT_EXPORT void didCreateFileWriter(WebFileWriter*, long long length);
97 103
98 // Called with an error code when a requested operation hasn't been 104 // Called with an error code when a requested operation hasn't been
99 // completed. 105 // completed.
100 WEBKIT_EXPORT void didFail(WebFileError); 106 WEBKIT_EXPORT void didFail(WebFileError);
101 107
102 // Returns true if the caller expects to be blocked until the request 108 // Returns true if the caller expects to be blocked until the request
103 // is fullfilled. 109 // is fullfilled.
104 WEBKIT_EXPORT bool shouldBlockUntilCompletion() const; 110 WEBKIT_EXPORT bool shouldBlockUntilCompletion() const;
105 111
106 private: 112 private:
107 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; 113 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private;
108 }; 114 };
109 115
110 } // namespace WebKit 116 } // namespace WebKit
111 117
112 #endif 118 #endif
OLDNEW
« Source/modules/filesystem/FileSystemClient.h ('K') | « public/platform/WebFileSystem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698