| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Returns the hash for the given canonicalized URL for use in visited | 120 // Returns the hash for the given canonicalized URL for use in visited |
| 121 // link coloring. | 121 // link coloring. |
| 122 virtual unsigned long long visitedLinkHash( | 122 virtual unsigned long long visitedLinkHash( |
| 123 const char* canonicalURL, size_t length) = 0; | 123 const char* canonicalURL, size_t length) = 0; |
| 124 | 124 |
| 125 // Returns whether the given link hash is in the user's history. The | 125 // Returns whether the given link hash is in the user's history. The |
| 126 // hash must have been generated by calling VisitedLinkHash(). | 126 // hash must have been generated by calling VisitedLinkHash(). |
| 127 virtual bool isLinkVisited(unsigned long long linkHash) = 0; | 127 virtual bool isLinkVisited(unsigned long long linkHash) = 0; |
| 128 | 128 |
| 129 | 129 |
| 130 // HTML5 DB ------------------------------------------------------------ | 130 // Database ------------------------------------------------------------ |
| 131 | 131 |
| 132 #ifdef WIN32 | 132 #ifdef WIN32 |
| 133 typedef HANDLE FileHandle; | 133 typedef HANDLE FileHandle; |
| 134 #else | 134 #else |
| 135 typedef int FileHandle; | 135 typedef int FileHandle; |
| 136 #endif | 136 #endif |
| 137 | 137 |
| 138 // Opens a database file; dirHandle should be NULL if the caller does not need | 138 // Opens a database file; dirHandle should be NULL if the caller does not need |
| 139 // a handle to the directory containing this file | 139 // a handle to the directory containing this file |
| 140 virtual FileHandle databaseOpenFile( | 140 virtual FileHandle databaseOpenFile( |
| 141 const WebString& fileName, int desiredFlags, FileHandle* dirHandle) = 0; | 141 const WebString& fileName, int desiredFlags, FileHandle* dirHandle) = 0; |
| 142 | 142 |
| 143 // Deletes a database file and returns the error code | 143 // Deletes a database file and returns the error code |
| 144 virtual int databaseDeleteFile(const WebString& fileName, bool syncDir) = 0; | 144 virtual int databaseDeleteFile(const WebString& fileName, bool syncDir) = 0; |
| 145 | 145 |
| 146 // Returns the attributes of the given database file | 146 // Returns the attributes of the given database file |
| 147 virtual long databaseGetFileAttributes(const WebString& fileName) = 0; | 147 virtual long databaseGetFileAttributes(const WebString& fileName) = 0; |
| 148 | 148 |
| 149 // Returns the size of the given database file | 149 // Returns the size of the given database file |
| 150 virtual long long databaseGetFileSize(const WebString& fileName) = 0; | 150 virtual long long databaseGetFileSize(const WebString& fileName) = 0; |
| 151 | 151 |
| 152 |
| 152 // Keygen -------------------------------------------------------------- | 153 // Keygen -------------------------------------------------------------- |
| 153 | 154 |
| 154 // Handle the <keygen> tag for generating client certificates | 155 // Handle the <keygen> tag for generating client certificates |
| 155 // Returns a base64 encoded signed copy of a public key from a newly | 156 // Returns a base64 encoded signed copy of a public key from a newly |
| 156 // generated key pair and the supplied challenge string. keySizeindex | 157 // generated key pair and the supplied challenge string. keySizeindex |
| 157 // specifies the strength of the key. | 158 // specifies the strength of the key. |
| 158 virtual WebString signedPublicKeyAndChallengeString(unsigned keySizeIndex, | 159 virtual WebString signedPublicKeyAndChallengeString(unsigned keySizeIndex, |
| 159 const WebKit::WebString& challenge, | 160 const WebKit::WebString& challenge, |
| 160 const WebKit::WebURL& url) = 0; | 161 const WebKit::WebURL& url) = 0; |
| 161 | 162 |
| 163 |
| 162 // Message Ports ------------------------------------------------------- | 164 // Message Ports ------------------------------------------------------- |
| 163 | 165 |
| 164 // Creates a Message Port Channel. This can be called on any thread. | 166 // Creates a Message Port Channel. This can be called on any thread. |
| 165 // The returned object should only be used on the thread it was created on. | 167 // The returned object should only be used on the thread it was created on. |
| 166 virtual WebMessagePortChannel* createMessagePortChannel() = 0; | 168 virtual WebMessagePortChannel* createMessagePortChannel() = 0; |
| 167 | 169 |
| 168 | 170 |
| 169 // Network ------------------------------------------------------------- | 171 // Network ------------------------------------------------------------- |
| 170 | 172 |
| 171 virtual void setCookies( | 173 virtual void setCookies( |
| 172 const WebURL& url, const WebURL& policyURL, const WebString& cookies) = 0; | 174 const WebURL& url, const WebURL& policyURL, const WebString& cookies) = 0; |
| 173 virtual WebString cookies(const WebURL& url, const WebURL& policyURL) = 0; | 175 virtual WebString cookies(const WebURL& url, const WebURL& policyURL) = 0; |
| 174 virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) = 0; | 176 virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) = 0; |
| 175 virtual void deleteCookie(const WebURL& url, const WebString& cookieName) = 0; | 177 virtual void deleteCookie(const WebURL& url, const WebString& cookieName) = 0; |
| 176 | 178 |
| 177 // A suggestion to prefetch IP information for the given hostname. | 179 // A suggestion to prefetch IP information for the given hostname. |
| 178 virtual void prefetchHostName(const WebString&) = 0; | 180 virtual void prefetchHostName(const WebString&) = 0; |
| 179 | 181 |
| 180 // Returns a new WebURLLoader instance. | 182 // Returns a new WebURLLoader instance. |
| 181 virtual WebURLLoader* createURLLoader() = 0; | 183 virtual WebURLLoader* createURLLoader() = 0; |
| 182 | 184 |
| 183 // Returns a new WebSocketStreamHandle instance. | 185 // Returns a new WebSocketStreamHandle instance. |
| 184 virtual WebSocketStreamHandle* createSocketStreamHandle() = 0; | 186 virtual WebSocketStreamHandle* createSocketStreamHandle() = 0; |
| 185 | 187 |
| 188 // Returns the User-Agent string that should be used for the given URL. |
| 189 virtual WebString userAgent(const WebURL&) = 0; |
| 190 |
| 186 | 191 |
| 187 // Plugins ------------------------------------------------------------- | 192 // Plugins ------------------------------------------------------------- |
| 188 | 193 |
| 189 // If refresh is true, then cached information should not be used to | 194 // If refresh is true, then cached information should not be used to |
| 190 // satisfy this call. | 195 // satisfy this call. |
| 191 virtual void getPluginList(bool refresh, WebPluginListBuilder*) = 0; | 196 virtual void getPluginList(bool refresh, WebPluginListBuilder*) = 0; |
| 192 | 197 |
| 193 | 198 |
| 194 // Profiling ----------------------------------------------------------- | 199 // Profiling ----------------------------------------------------------- |
| 195 | 200 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // Callable from a background WebKit thread. | 252 // Callable from a background WebKit thread. |
| 248 virtual void callOnMainThread(void (*func)()) = 0; | 253 virtual void callOnMainThread(void (*func)()) = 0; |
| 249 | 254 |
| 250 protected: | 255 protected: |
| 251 ~WebKitClient() { } | 256 ~WebKitClient() { } |
| 252 }; | 257 }; |
| 253 | 258 |
| 254 } // namespace WebKit | 259 } // namespace WebKit |
| 255 | 260 |
| 256 #endif | 261 #endif |
| OLD | NEW |