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

Unified Diff: webkit/api/public/WebKitClient.h

Issue 159778: Make LocalStorage persistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « chrome/worker/worker_webkitclient_impl.cc ('k') | webkit/api/src/ChromiumBridge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/public/WebKitClient.h
===================================================================
--- webkit/api/public/WebKitClient.h (revision 22402)
+++ webkit/api/public/WebKitClient.h (working copy)
@@ -31,6 +31,8 @@
#ifndef WebKitClient_h
#define WebKitClient_h
+#include <time.h>
+
#include "WebCommon.h"
#include "WebLocalizedString.h"
@@ -81,7 +83,16 @@
// File ----------------------------------------------------------------
+ // Various file/directory related functions. These map 1:1 with
+ // functions in WebCore's FileSystem.h.
+ virtual bool fileExists(const WebString& path) = 0;
+ virtual bool deleteFile(const WebString& path) = 0;
+ virtual bool deleteEmptyDirectory(const WebString& path) = 0;
virtual bool getFileSize(const WebString& path, long long& result) = 0;
+ virtual bool getFileModificationTime(const WebString& path, time_t& result) = 0;
+ virtual WebString directoryName(const WebString& path) = 0;
+ virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) = 0;
+ virtual bool makeAllDirectories(const WebString& path) = 0;
// History -------------------------------------------------------------
@@ -95,7 +106,27 @@
// hash must have been generated by calling VisitedLinkHash().
virtual bool isLinkVisited(unsigned long long linkHash) = 0;
+ // HTML5 DB ------------------------------------------------------------
+#if defined(OS_WIN)
+ typedef HANDLE FileType;
+#else
+ typedef int FileType;
+#endif
+
+ // Opens a database file
+ virtual FileType databaseOpenFile(const WebString& fileName, int desiredFlags) = 0;
+
+ // Deletes a database file and returns the error code
+ virtual bool databaseDeleteFile(const WebString& fileName) = 0;
+
+ // Returns the attributes of the given database file
+ virtual long databaseGetFileAttributes(const WebString& fileName) = 0;
+
+ // Returns the size of the given database file
+ virtual long long databaseGetFileSize(const WebString& fileName) = 0;
+
+
// Message Ports -------------------------------------------------------
// Creates a Message Port Channel. This can be called on any thread.
@@ -145,6 +176,18 @@
virtual WebString queryLocalizedString(WebLocalizedString::Name, int numericValue) = 0;
+ // Sandbox ------------------------------------------------------------
+
+ // In some browsers, a "sandbox" restricts what operations a program
+ // is allowed to preform. Such operations are typically abstracted out
+ // via this API, but sometimes (like in HTML 5 database opening) WebKit
+ // needs to behave differently based on whether it's restricted or not.
+ // In these cases (and these cases only) you can call this function.
+ // It's OK for this value to be conservitive (i.e. true even if the
+ // sandbox isn't active).
+ virtual bool sandboxEnabled() = 0;
+
+
// Sudden Termination --------------------------------------------------
// Disable/Enable sudden termination.
@@ -166,26 +209,6 @@
// Callable from a background WebKit thread.
virtual void callOnMainThread(void (*func)()) = 0;
-
- // HTML5 DB ------------------------------------------------------------
-
-#if defined(OS_WIN)
-typedef HANDLE FileType;
-#else
-typedef int FileType;
-#endif
-
- // Opens a database file
- virtual FileType databaseOpenFile(const WebString& fileName, int desiredFlags) = 0;
-
- // Deletes a database file and returns the error code
- virtual bool databaseDeleteFile(const WebString& fileName) = 0;
-
- // Returns the attributes of the given database file
- virtual long databaseGetFileAttributes(const WebString& fileName) = 0;
-
- // Returns the size of the given database file
- virtual long long databaseGetFileSize(const WebString& fileName) = 0;
};
} // namespace WebKit
« no previous file with comments | « chrome/worker/worker_webkitclient_impl.cc ('k') | webkit/api/src/ChromiumBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698