| 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" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 16 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" | 16 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" |
| 17 #include "v8/include/v8.h" | 17 #include "v8/include/v8.h" |
| 18 #include "webkit/tools/test_shell/test_shell.h" | 18 #include "webkit/tools/test_shell/test_shell.h" |
| 19 | 19 |
| 20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 21 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" | 21 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) { | 24 TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) |
| 25 : real_clipboard_(&clipboard_client_) { |
| 25 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); | 26 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); |
| 26 | 27 |
| 27 WebKit::initialize(this); | 28 WebKit::initialize(this); |
| 28 WebKit::setLayoutTestMode(layout_test_mode); | 29 WebKit::setLayoutTestMode(layout_test_mode); |
| 29 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( | 30 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( |
| 30 WebKit::WebString::fromUTF8("test-shell-resource")); | 31 WebKit::WebString::fromUTF8("test-shell-resource")); |
| 31 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( | 32 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( |
| 32 WebKit::WebString::fromUTF8("test-shell-resource")); | 33 WebKit::WebString::fromUTF8("test-shell-resource")); |
| 33 WebKit::WebScriptController::enableV8SingleThreadMode(); | 34 WebKit::WebScriptController::enableV8SingleThreadMode(); |
| 34 WebKit::WebRuntimeFeatures::enableSockets(true); | 35 WebKit::WebRuntimeFeatures::enableSockets(true); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 294 |
| 294 WebKit::WebSharedWorkerRepository* | 295 WebKit::WebSharedWorkerRepository* |
| 295 TestShellWebKitInit::sharedWorkerRepository() { | 296 TestShellWebKitInit::sharedWorkerRepository() { |
| 296 return NULL; | 297 return NULL; |
| 297 } | 298 } |
| 298 | 299 |
| 299 WebKit::WebGraphicsContext3D* TestShellWebKitInit::createGraphicsContext3D() { | 300 WebKit::WebGraphicsContext3D* TestShellWebKitInit::createGraphicsContext3D() { |
| 300 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( | 301 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
| 301 gfx::kNullPluginWindow, NULL); | 302 gfx::kNullPluginWindow, NULL); |
| 302 } | 303 } |
| OLD | NEW |