| 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 NOTREACHED(); |
| 333 } | 339 } |
| 334 | 340 |
| 335 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { | 341 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { |
| 336 return WebKit::WebIDBFactory::create(); | 342 return WebKit::WebIDBFactory::create(); |
| 337 } | 343 } |
| 338 | 344 |
| 339 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( | 345 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( |
| 340 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 346 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
| 341 const WebKit::WebString& keyPath, | 347 const WebKit::WebString& keyPath, |
| 342 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 348 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) { | 449 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
| 444 return SimpleResourceLoaderBridge::Create(request_info); | 450 return SimpleResourceLoaderBridge::Create(request_info); |
| 445 } | 451 } |
| 446 | 452 |
| 447 webkit_glue::WebSocketStreamHandleBridge* | 453 webkit_glue::WebSocketStreamHandleBridge* |
| 448 TestWebKitPlatformSupport::CreateWebSocketBridge( | 454 TestWebKitPlatformSupport::CreateWebSocketBridge( |
| 449 WebKit::WebSocketStreamHandle* handle, | 455 WebKit::WebSocketStreamHandle* handle, |
| 450 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 456 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
| 451 return SimpleSocketStreamBridge::Create(handle, delegate); | 457 return SimpleSocketStreamBridge::Create(handle, delegate); |
| 452 } | 458 } |
| OLD | NEW |