| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 const WebKit::WebString& path, unsigned quota) { | 323 const WebKit::WebString& path, unsigned quota) { |
| 324 return dom_storage_system_.CreateLocalStorageNamespace(); | 324 return dom_storage_system_.CreateLocalStorageNamespace(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { | 327 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { |
| 328 return WebKit::WebIDBFactory::create(); | 328 return WebKit::WebIDBFactory::create(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( | 331 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( |
| 332 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 332 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
| 333 const WebKit::WebString& keyPath, | 333 const WebKit::WebIDBKeyPath& keyPath, |
| 334 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 334 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
| 335 WebKit::WebVector<WebKit::WebIDBKey> keys(values.size()); | 335 WebKit::WebVector<WebKit::WebIDBKey> keys(values.size()); |
| 336 for (size_t i = 0; i < values.size(); ++i) { | 336 for (size_t i = 0; i < values.size(); ++i) { |
| 337 keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath( | 337 keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath( |
| 338 values[i], WebKit::WebIDBKeyPath::create(keyPath)); | 338 values[i], keyPath); |
| 339 } | 339 } |
| 340 keys_out.swap(keys); | 340 keys_out.swap(keys); |
| 341 } | 341 } |
| 342 | 342 |
| 343 WebKit::WebSerializedScriptValue | 343 WebKit::WebSerializedScriptValue |
| 344 TestWebKitPlatformSupport::injectIDBKeyIntoSerializedValue( | 344 TestWebKitPlatformSupport::injectIDBKeyIntoSerializedValue( |
| 345 const WebKit::WebIDBKey& key, | 345 const WebKit::WebIDBKey& key, |
| 346 const WebKit::WebSerializedScriptValue& value, | 346 const WebKit::WebSerializedScriptValue& value, |
| 347 const WebKit::WebString& keyPath) { | 347 const WebKit::WebIDBKeyPath& keyPath) { |
| 348 return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue( | 348 return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue( |
| 349 key, value, WebKit::WebIDBKeyPath::create(keyPath)); | 349 key, value, keyPath); |
| 350 } | 350 } |
| 351 | 351 |
| 352 #if defined(OS_WIN) || defined(OS_MACOSX) | 352 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 353 void TestWebKitPlatformSupport::SetThemeEngine(WebKit::WebThemeEngine* engine) { | 353 void TestWebKitPlatformSupport::SetThemeEngine(WebKit::WebThemeEngine* engine) { |
| 354 active_theme_engine_ = engine ? | 354 active_theme_engine_ = engine ? |
| 355 engine : WebKitPlatformSupportImpl::themeEngine(); | 355 engine : WebKitPlatformSupportImpl::themeEngine(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { | 358 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { |
| 359 return active_theme_engine_; | 359 return active_theme_engine_; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 441 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
| 442 return SimpleResourceLoaderBridge::Create(request_info); | 442 return SimpleResourceLoaderBridge::Create(request_info); |
| 443 } | 443 } |
| 444 | 444 |
| 445 webkit_glue::WebSocketStreamHandleBridge* | 445 webkit_glue::WebSocketStreamHandleBridge* |
| 446 TestWebKitPlatformSupport::CreateWebSocketBridge( | 446 TestWebKitPlatformSupport::CreateWebSocketBridge( |
| 447 WebKit::WebSocketStreamHandle* handle, | 447 WebKit::WebSocketStreamHandle* handle, |
| 448 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 448 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
| 449 return SimpleSocketStreamBridge::Create(handle, delegate); | 449 return SimpleSocketStreamBridge::Create(handle, delegate); |
| 450 } | 450 } |
| OLD | NEW |