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(); |
| 262 #else |
260 // Enforce quota here, ignoring the value from the renderer as in Chrome. | 263 // Enforce quota here, ignoring the value from the renderer as in Chrome. |
261 return WebKit::WebStorageNamespace::createLocalStorageNamespace( | 264 return WebKit::WebStorageNamespace::createLocalStorageNamespace( |
262 path, | 265 path, |
263 WebKit::WebStorageNamespace::m_localStorageQuota); | 266 WebKit::WebStorageNamespace::m_localStorageQuota); |
| 267 #endif |
264 } | 268 } |
265 | 269 |
266 void TestShellWebKitInit::dispatchStorageEvent( | 270 void TestShellWebKitInit::dispatchStorageEvent( |
267 const WebKit::WebString& key, | 271 const WebKit::WebString& key, |
268 const WebKit::WebString& old_value, const WebKit::WebString& new_value, | 272 const WebKit::WebString& old_value, const WebKit::WebString& new_value, |
269 const WebKit::WebString& origin, const WebKit::WebURL& url, | 273 const WebKit::WebString& origin, const WebKit::WebURL& url, |
270 bool is_local_storage) { | 274 bool is_local_storage) { |
271 // The event is dispatched by the proxy. | 275 // All events are dispatched by the WebCore::StorageAreaProxy in the |
| 276 // simple single process case. |
| 277 NOTREACHED(); |
272 } | 278 } |
273 | 279 |
274 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { | 280 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { |
275 return WebKit::WebIDBFactory::create(); | 281 return WebKit::WebIDBFactory::create(); |
276 } | 282 } |
277 | 283 |
278 void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath( | 284 void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath( |
279 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 285 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
280 const WebKit::WebString& keyPath, | 286 const WebKit::WebString& keyPath, |
281 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { | 287 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 340 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
335 return SimpleResourceLoaderBridge::Create(request_info); | 341 return SimpleResourceLoaderBridge::Create(request_info); |
336 } | 342 } |
337 | 343 |
338 webkit_glue::WebSocketStreamHandleBridge* | 344 webkit_glue::WebSocketStreamHandleBridge* |
339 TestShellWebKitInit::CreateWebSocketBridge( | 345 TestShellWebKitInit::CreateWebSocketBridge( |
340 WebKit::WebSocketStreamHandle* handle, | 346 WebKit::WebSocketStreamHandle* handle, |
341 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 347 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
342 return SimpleSocketStreamBridge::Create(handle, delegate); | 348 return SimpleSocketStreamBridge::Create(handle, delegate); |
343 } | 349 } |
OLD | NEW |