| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 WebKit::WebSharedWorkerRepository* | 298 WebKit::WebSharedWorkerRepository* |
| 299 TestShellWebKitInit::sharedWorkerRepository() { | 299 TestShellWebKitInit::sharedWorkerRepository() { |
| 300 return NULL; | 300 return NULL; |
| 301 } | 301 } |
| 302 | 302 |
| 303 WebKit::WebGraphicsContext3D* TestShellWebKitInit::createGraphicsContext3D() { | 303 WebKit::WebGraphicsContext3D* TestShellWebKitInit::createGraphicsContext3D() { |
| 304 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( | 304 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
| 305 gfx::kNullPluginWindow, NULL); | 305 gfx::kNullPluginWindow, NULL); |
| 306 } | 306 } |
| 307 | 307 |
| 308 WebKit::WebGraphicsContext3D* |
| 309 TestShellWebKitInit::createOffscreenGraphicsContext3D( |
| 310 const WebKit::WebGraphicsContext3D::Attributes& attributes) { |
| 311 scoped_ptr<WebGraphicsContext3D> context( |
| 312 new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
| 313 gfx::kNullPluginWindow, NULL)); |
| 314 if (!context->initialize(attributes, NULL, false)) |
| 315 return NULL; |
| 316 return context.release(); |
| 317 } |
| 318 |
| 308 void TestShellWebKitInit::GetPlugins( | 319 void TestShellWebKitInit::GetPlugins( |
| 309 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { | 320 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { |
| 310 if (refresh) | 321 if (refresh) |
| 311 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); | 322 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
| 312 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); | 323 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); |
| 313 // Don't load the forked TestNetscapePlugIn in the chromium code, use | 324 // Don't load the forked TestNetscapePlugIn in the chromium code, use |
| 314 // the copy in webkit.org's repository instead. | 325 // the copy in webkit.org's repository instead. |
| 315 const FilePath::StringType kPluginBlackList[] = { | 326 const FilePath::StringType kPluginBlackList[] = { |
| 316 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), | 327 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), |
| 317 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), | 328 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 332 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 343 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
| 333 return SimpleResourceLoaderBridge::Create(request_info); | 344 return SimpleResourceLoaderBridge::Create(request_info); |
| 334 } | 345 } |
| 335 | 346 |
| 336 webkit_glue::WebSocketStreamHandleBridge* | 347 webkit_glue::WebSocketStreamHandleBridge* |
| 337 TestShellWebKitInit::CreateWebSocketBridge( | 348 TestShellWebKitInit::CreateWebSocketBridge( |
| 338 WebKit::WebSocketStreamHandle* handle, | 349 WebKit::WebSocketStreamHandle* handle, |
| 339 webkit_glue::WebSocketStreamHandleDelegate* delegate) { | 350 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
| 340 return SimpleSocketStreamBridge::Create(handle, delegate); | 351 return SimpleSocketStreamBridge::Create(handle, delegate); |
| 341 } | 352 } |
| OLD | NEW |