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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return dom_storage_system_.CreateLocalStorageNamespace(); | 260 return dom_storage_system_.CreateLocalStorageNamespace(); |
261 } | 261 } |
262 | 262 |
263 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { | 263 WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() { |
264 return WebKit::WebIDBFactory::create(); | 264 return WebKit::WebIDBFactory::create(); |
265 } | 265 } |
266 | 266 |
| 267 void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath( |
| 268 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
| 269 const WebKit::WebIDBKeyPath& keyPath, |
| 270 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) { |
| 271 WebKit::WebVector<WebKit::WebIDBKey> keys(values.size()); |
| 272 for (size_t i = 0; i < values.size(); ++i) { |
| 273 keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath( |
| 274 values[i], keyPath); |
| 275 } |
| 276 keys_out.swap(keys); |
| 277 } |
| 278 |
| 279 WebKit::WebSerializedScriptValue |
| 280 TestShellWebKitInit::injectIDBKeyIntoSerializedValue( |
| 281 const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value, |
| 282 const WebKit::WebIDBKeyPath& keyPath) { |
| 283 return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue( |
| 284 key, value, keyPath); |
| 285 } |
| 286 |
267 WebKit::WebSharedWorkerRepository* | 287 WebKit::WebSharedWorkerRepository* |
268 TestShellWebKitInit::sharedWorkerRepository() { | 288 TestShellWebKitInit::sharedWorkerRepository() { |
269 return NULL; | 289 return NULL; |
270 } | 290 } |
271 | 291 |
272 WebKit::WebGraphicsContext3D* | 292 WebKit::WebGraphicsContext3D* |
273 TestShellWebKitInit::createOffscreenGraphicsContext3D( | 293 TestShellWebKitInit::createOffscreenGraphicsContext3D( |
274 const WebKit::WebGraphicsContext3D::Attributes& attributes) { | 294 const WebKit::WebGraphicsContext3D::Attributes& attributes) { |
275 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( | 295 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( |
276 attributes, false); | 296 attributes, false); |
(...skipping 26 matching lines...) Expand all Loading... |
303 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 323 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
304 return SimpleResourceLoaderBridge::Create(request_info); | 324 return SimpleResourceLoaderBridge::Create(request_info); |
305 } | 325 } |
306 | 326 |
307 webkit_glue::WebSocketStreamHandleBridge* | 327 webkit_glue::WebSocketStreamHandleBridge* |
308 TestShellWebKitInit::CreateWebSocketBridge( | 328 TestShellWebKitInit::CreateWebSocketBridge( |
309 WebKit::WebSocketStreamHandle* handle, | 329 WebKit::WebSocketStreamHandle* handle, |
310 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 330 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
311 return SimpleSocketStreamBridge::Create(handle, delegate); | 331 return SimpleSocketStreamBridge::Create(handle, delegate); |
312 } | 332 } |
OLD | NEW |