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(); | 324 return dom_storage_system_.CreateLocalStorageNamespace(); |
326 #else | |
327 return WebKit::WebStorageNamespace::createLocalStorageNamespace(path, quota); | |
328 #endif | |
329 } | |
330 | |
331 void TestWebKitPlatformSupport::dispatchStorageEvent( | |
332 const WebKit::WebString& key, | |
333 const WebKit::WebString& old_value, const WebKit::WebString& new_value, | |
334 const WebKit::WebString& origin, const WebKit::WebURL& url, | |
335 bool is_local_storage) { | |
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 | |
341 } | 325 } |
342 | 326 |
343 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { | 327 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { |
344 return WebKit::WebIDBFactory::create(); | 328 return WebKit::WebIDBFactory::create(); |
345 } | 329 } |
346 | 330 |
347 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( | 331 void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath( |
348 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 332 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
349 const WebKit::WebString& keyPath, | 333 const WebKit::WebString& keyPath, |
350 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 334 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 441 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
458 return SimpleResourceLoaderBridge::Create(request_info); | 442 return SimpleResourceLoaderBridge::Create(request_info); |
459 } | 443 } |
460 | 444 |
461 webkit_glue::WebSocketStreamHandleBridge* | 445 webkit_glue::WebSocketStreamHandleBridge* |
462 TestWebKitPlatformSupport::CreateWebSocketBridge( | 446 TestWebKitPlatformSupport::CreateWebSocketBridge( |
463 WebKit::WebSocketStreamHandle* handle, | 447 WebKit::WebSocketStreamHandle* handle, |
464 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 448 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
465 return SimpleSocketStreamBridge::Create(handle, delegate); | 449 return SimpleSocketStreamBridge::Create(handle, delegate); |
466 } | 450 } |
OLD | NEW |