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/support/test_webkit_platform_support.h" | 5 #include "webkit/support/test_webkit_platform_support.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/metrics/stats_counters.h" | 8 #include "base/metrics/stats_counters.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); | 314 return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); |
315 } | 315 } |
316 | 316 |
317 WebKit::WebString TestWebKitPlatformSupport::defaultLocale() { | 317 WebKit::WebString TestWebKitPlatformSupport::defaultLocale() { |
318 return ASCIIToUTF16("en-US"); | 318 return ASCIIToUTF16("en-US"); |
319 } | 319 } |
320 | 320 |
321 WebKit::WebStorageNamespace* | 321 WebKit::WebStorageNamespace* |
322 TestWebKitPlatformSupport::createLocalStorageNamespace( | 322 TestWebKitPlatformSupport::createLocalStorageNamespace( |
323 const WebKit::WebString& path, unsigned quota) { | 323 const WebKit::WebString& path, unsigned quota) { |
| 324 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 325 return dom_storage_system_.CreateLocalStorageNamespace(); |
| 326 #else |
324 return WebKit::WebStorageNamespace::createLocalStorageNamespace(path, quota); | 327 return WebKit::WebStorageNamespace::createLocalStorageNamespace(path, quota); |
| 328 #endif |
325 } | 329 } |
326 | 330 |
327 void TestWebKitPlatformSupport::dispatchStorageEvent( | 331 void TestWebKitPlatformSupport::dispatchStorageEvent( |
328 const WebKit::WebString& key, | 332 const WebKit::WebString& key, |
329 const WebKit::WebString& old_value, const WebKit::WebString& new_value, | 333 const WebKit::WebString& old_value, const WebKit::WebString& new_value, |
330 const WebKit::WebString& origin, const WebKit::WebURL& url, | 334 const WebKit::WebString& origin, const WebKit::WebURL& url, |
331 bool is_local_storage) { | 335 bool is_local_storage) { |
332 // The event is dispatched by the proxy. | 336 // All events are dispatched by the WebCore::StorageAreaProxy in the |
| 337 // simple single process case. |
| 338 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 339 NOTREACHED(); |
| 340 #endif |
333 } | 341 } |
334 | 342 |
335 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { | 343 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { |
336 return WebKit::WebIDBFactory::create(); | 344 return WebKit::WebIDBFactory::create(); |
337 } | 345 } |
338 | 346 |
339 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( | 347 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( |
340 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 348 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
341 const WebKit::WebString& keyPath, | 349 const WebKit::WebString& keyPath, |
342 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 350 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 451 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
444 return SimpleResourceLoaderBridge::Create(request_info); | 452 return SimpleResourceLoaderBridge::Create(request_info); |
445 } | 453 } |
446 | 454 |
447 webkit_glue::WebSocketStreamHandleBridge* | 455 webkit_glue::WebSocketStreamHandleBridge* |
448 TestWebKitPlatformSupport::CreateWebSocketBridge( | 456 TestWebKitPlatformSupport::CreateWebSocketBridge( |
449 WebKit::WebSocketStreamHandle* handle, | 457 WebKit::WebSocketStreamHandle* handle, |
450 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 458 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
451 return SimpleSocketStreamBridge::Create(handle, delegate); | 459 return SimpleSocketStreamBridge::Create(handle, delegate); |
452 } | 460 } |
OLD | NEW |