summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public/WebKitClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public/WebKitClient.h')
-rw-r--r--WebKit/chromium/public/WebKitClient.h87
1 files changed, 48 insertions, 39 deletions
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index fbaa218..9c0b4c2 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -35,8 +35,8 @@
#include "WebData.h"
#include "WebLocalizedString.h"
#include "WebString.h"
-#include "WebURL.h"
#include "WebVector.h"
+#include "WebURL.h"
#include <time.h>
@@ -48,18 +48,25 @@ namespace WebKit {
class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
+class WebBlobRegistry;
class WebClipboard;
+class WebCookieJar;
+class WebFileSystem;
+class WebFileUtilities;
+class WebGLES2Context;
+class WebGraphicsContext3D;
+class WebIDBFactory;
+class WebIDBKey;
class WebMessagePortChannel;
class WebMimeRegistry;
class WebPluginListBuilder;
class WebSandboxSupport;
+class WebSerializedScriptValue;
class WebSharedWorkerRepository;
class WebSocketStreamHandle;
class WebStorageNamespace;
class WebThemeEngine;
class WebURLLoader;
-struct WebCookie;
-template <typename T> class WebVector;
class WebKitClient {
public:
@@ -69,51 +76,34 @@ public:
// Must return non-null.
virtual WebMimeRegistry* mimeRegistry() { return 0; }
+ // Must return non-null.
+ virtual WebFileUtilities* fileUtilities() { return 0; }
+
// May return null if sandbox support is not necessary
virtual WebSandboxSupport* sandboxSupport() { return 0; }
// May return null on some platforms.
virtual WebThemeEngine* themeEngine() { return 0; }
+ // May return null.
+ virtual WebCookieJar* cookieJar() { return 0; }
- // Application Cache --------------------------------------------
-
- // May return null if the process type doesn't involve appcaching.
- virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) { return 0; }
+ // Blob ----------------------------------------------------------------
+ // Must return non-null.
+ virtual WebBlobRegistry* blobRegistry() { return 0; }
// DOM Storage --------------------------------------------------
// Return a LocalStorage namespace that corresponds to the following path.
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
- // Return a new SessionStorage namespace.
- // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this.
- virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
-
// Called when storage events fire.
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
const WebURL& url, bool isLocalStorage) { }
- // File ----------------------------------------------------------------
-
- // Various file/directory related functions. These map 1:1 with
- // functions in WebCore's FileSystem.h.
- virtual bool fileExists(const WebString& path) { return false; }
- virtual bool deleteFile(const WebString& path) { return false; }
- virtual bool deleteEmptyDirectory(const WebString& path) { return false; }
- virtual bool getFileSize(const WebString& path, long long& result) { return false; }
- virtual bool getFileModificationTime(const WebString& path, time_t& result) { return false; }
- virtual WebString directoryName(const WebString& path) { return WebString(); }
- virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); }
- virtual bool makeAllDirectories(const WebString& path) { return false; }
- virtual WebString getAbsolutePath(const WebString& path) { return WebString(); }
- virtual bool isDirectory(const WebString& path) { return false; }
- virtual WebURL filePathToURL(const WebString& path) { return WebURL(); }
-
-
// History -------------------------------------------------------------
// Returns the hash for the given canonicalized URL for use in visited
@@ -126,7 +116,7 @@ public:
virtual bool isLinkVisited(unsigned long long linkHash) { return false; }
- // Database ------------------------------------------------------------
+ // HTML5 Database ------------------------------------------------------
#ifdef WIN32
typedef HANDLE FileHandle;
@@ -137,7 +127,7 @@ public:
// Opens a database file; dirHandle should be 0 if the caller does not need
// a handle to the directory containing this file
virtual FileHandle databaseOpenFile(
- const WebString& vfsFileName, int desiredFlags, FileHandle* dirHandle) { return FileHandle(); }
+ const WebString& vfsFileName, int desiredFlags) { return FileHandle(); }
// Deletes a database file and returns the error code
virtual int databaseDeleteFile(const WebString& vfsFileName, bool syncDir) { return 0; }
@@ -149,6 +139,12 @@ public:
virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; }
+ // Indexed Database ----------------------------------------------------
+
+ virtual WebIDBFactory* idbFactory() { return 0; }
+ virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
+
+
// Keygen --------------------------------------------------------------
// Handle the <keygen> tag for generating client certificates
@@ -177,13 +173,6 @@ public:
// Network -------------------------------------------------------------
- virtual void setCookies(
- const WebURL& url, const WebURL& firstPartyForCookies, const WebString& cookies) { }
- virtual WebString cookies(const WebURL& url, const WebURL& firstPartyForCookies) { return WebString(); }
- virtual bool rawCookies(const WebURL& url, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; }
- virtual void deleteCookie(const WebURL& url, const WebString& cookieName) { }
- virtual bool cookiesEnabled(const WebURL& url, const WebURL& firstPartyForCookies) { return true; }
-
// A suggestion to prefetch IP information for the given hostname.
virtual void prefetchHostName(const WebString&) { }
@@ -196,6 +185,9 @@ public:
// Returns the User-Agent string that should be used for the given URL.
virtual WebString userAgent(const WebURL&) { return WebString(); }
+ // A suggestion to cache this metadata in association with this URL.
+ virtual void cacheMetadata(const WebURL&, double responseTime, const char* data, size_t dataSize) { }
+
// Plugins -------------------------------------------------------------
@@ -267,7 +259,24 @@ public:
virtual void stopSharedTimer() { }
// Callable from a background WebKit thread.
- virtual void callOnMainThread(void (*func)()) { }
+ virtual void callOnMainThread(void (*func)(void*), void* context) { }
+
+ // WebGL --------------------------------------------------------------
+
+ // May return null if WebGL is not supported.
+ // Returns newly allocated WebGraphicsContext3D instance.
+ virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; }
+
+ // GLES2 --------------------------------------------------------------
+
+ // Returns newly allocated WebGLES2Context instance.
+ // May return null if it fails to create the context.
+ virtual WebGLES2Context* createGLES2Context() { return 0; }
+
+ // FileSystem ----------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
protected:
~WebKitClient() { }