OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/file_util.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 30 matching lines...) Expand all Loading... |
41 #endif | 41 #endif |
42 | 42 |
43 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { | 43 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { |
44 public: | 44 public: |
45 explicit TestShellWebKitInit(bool layout_test_mode) { | 45 explicit TestShellWebKitInit(bool layout_test_mode) { |
46 v8::V8::SetCounterFunction(StatsTable::FindLocation); | 46 v8::V8::SetCounterFunction(StatsTable::FindLocation); |
47 | 47 |
48 WebKit::initialize(this); | 48 WebKit::initialize(this); |
49 WebKit::setLayoutTestMode(layout_test_mode); | 49 WebKit::setLayoutTestMode(layout_test_mode); |
50 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( | 50 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( |
51 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); | 51 WebKit::WebString::fromUTF8("test-shell-resource")); |
52 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( | 52 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( |
53 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); | 53 WebKit::WebString::fromUTF8("test-shell-resource")); |
54 WebKit::WebScriptController::enableV8SingleThreadMode(); | 54 WebKit::WebScriptController::enableV8SingleThreadMode(); |
55 WebKit::WebScriptController::registerExtension( | 55 WebKit::WebScriptController::registerExtension( |
56 extensions_v8::GearsExtension::Get()); | 56 extensions_v8::GearsExtension::Get()); |
57 WebKit::WebScriptController::registerExtension( | 57 WebKit::WebScriptController::registerExtension( |
58 extensions_v8::IntervalExtension::Get()); | 58 extensions_v8::IntervalExtension::Get()); |
59 WebKit::WebRuntimeFeatures::enableSockets(true); | 59 WebKit::WebRuntimeFeatures::enableSockets(true); |
60 | 60 |
61 // Load libraries for media and enable the media player. | 61 // Load libraries for media and enable the media player. |
62 FilePath module_path; | 62 FilePath module_path; |
63 WebKit::WebRuntimeFeatures::enableMediaPlayer( | 63 WebKit::WebRuntimeFeatures::enableMediaPlayer( |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 SimpleAppCacheSystem appcache_system_; | 238 SimpleAppCacheSystem appcache_system_; |
239 SimpleDatabaseSystem database_system_; | 239 SimpleDatabaseSystem database_system_; |
240 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; | 240 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; |
241 | 241 |
242 #if defined(OS_WIN) | 242 #if defined(OS_WIN) |
243 WebKit::WebThemeEngine* active_theme_engine_; | 243 WebKit::WebThemeEngine* active_theme_engine_; |
244 #endif | 244 #endif |
245 }; | 245 }; |
246 | 246 |
247 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 247 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
OLD | NEW |