OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/tools/test_shell/test_shell_webkit_init.h" | 5 #include "webkit/tools/test_shell/test_shell_webkit_init.h" |
6 | 6 |
7 #include "base/metrics/stats_counters.h" | 7 #include "base/metrics/stats_counters.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "media/base/media.h" | 9 #include "media/base/media.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 return ASCIIToUTF16("step mismatch"); | 250 return ASCIIToUTF16("step mismatch"); |
251 return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); | 251 return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); |
252 } | 252 } |
253 | 253 |
254 WebKit::WebString TestShellWebKitInit::defaultLocale() { | 254 WebKit::WebString TestShellWebKitInit::defaultLocale() { |
255 return ASCIIToUTF16("en-US"); | 255 return ASCIIToUTF16("en-US"); |
256 } | 256 } |
257 | 257 |
258 WebKit::WebStorageNamespace* TestShellWebKitInit::createLocalStorageNamespace( | 258 WebKit::WebStorageNamespace* TestShellWebKitInit::createLocalStorageNamespace( |
259 const WebKit::WebString& path, unsigned quota) { | 259 const WebKit::WebString& path, unsigned quota) { |
260 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND | |
261 return dom_storage_system_.CreateLocalStorageNamespace(); | 260 return dom_storage_system_.CreateLocalStorageNamespace(); |
262 #else | |
263 // Enforce quota here, ignoring the value from the renderer as in Chrome. | |
264 return WebKit::WebStorageNamespace::createLocalStorageNamespace( | |
265 path, | |
266 WebKit::WebStorageNamespace::m_localStorageQuota); | |
267 #endif | |
268 } | |
269 | |
270 void TestShellWebKitInit::dispatchStorageEvent( | |
271 const WebKit::WebString& key, | |
272 const WebKit::WebString& old_value, const WebKit::WebString& new_value, | |
273 const WebKit::WebString& origin, const WebKit::WebURL& url, | |
274 bool is_local_storage) { | |
275 // All events are dispatched by the WebCore::StorageAreaProxy in the | |
276 // simple single process case. | |
277 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND | |
278 NOTREACHED(); | |
279 #endif | |
280 } | 261 } |
281 | 262 |
282 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { | 263 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { |
283 return WebKit::WebIDBFactory::create(); | 264 return WebKit::WebIDBFactory::create(); |
284 } | 265 } |
285 | 266 |
286 void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath( | 267 void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath( |
287 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 268 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
288 const WebKit::WebString& keyPath, | 269 const WebKit::WebString& keyPath, |
289 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 270 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 323 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
343 return SimpleResourceLoaderBridge::Create(request_info); | 324 return SimpleResourceLoaderBridge::Create(request_info); |
344 } | 325 } |
345 | 326 |
346 webkit_glue::WebSocketStreamHandleBridge* | 327 webkit_glue::WebSocketStreamHandleBridge* |
347 TestShellWebKitInit::CreateWebSocketBridge( | 328 TestShellWebKitInit::CreateWebSocketBridge( |
348 WebKit::WebSocketStreamHandle* handle, | 329 WebKit::WebSocketStreamHandle* handle, |
349 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 330 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
350 return SimpleSocketStreamBridge::Create(handle, delegate); | 331 return SimpleSocketStreamBridge::Create(handle, delegate); |
351 } | 332 } |
OLD | NEW |