Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: webkit/tools/test_shell/test_shell_webkit_init.h

Issue 293021: Introduce WebSecurityPolicy for security related methods (Closed)
Patch Set: socket needs weburl import Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/stats_counters.h" 11 #include "base/stats_counters.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "media/base/media.h" 13 #include "media/base/media.h"
14 #include "webkit/api/public/WebData.h" 14 #include "webkit/api/public/WebData.h"
15 #include "webkit/api/public/WebKit.h" 15 #include "webkit/api/public/WebKit.h"
16 #include "webkit/api/public/WebScriptController.h" 16 #include "webkit/api/public/WebScriptController.h"
17 #include "webkit/api/public/WebSecurityPolicy.h"
17 #include "webkit/api/public/WebStorageArea.h" 18 #include "webkit/api/public/WebStorageArea.h"
18 #include "webkit/api/public/WebStorageEventDispatcher.h" 19 #include "webkit/api/public/WebStorageEventDispatcher.h"
19 #include "webkit/api/public/WebStorageNamespace.h" 20 #include "webkit/api/public/WebStorageNamespace.h"
20 #include "webkit/api/public/WebString.h" 21 #include "webkit/api/public/WebString.h"
21 #include "webkit/api/public/WebURL.h" 22 #include "webkit/api/public/WebURL.h"
22 #include "webkit/appcache/web_application_cache_host_impl.h" 23 #include "webkit/appcache/web_application_cache_host_impl.h"
23 #include "webkit/database/vfs_backend.h" 24 #include "webkit/database/vfs_backend.h"
24 #include "webkit/extensions/v8/gears_extension.h" 25 #include "webkit/extensions/v8/gears_extension.h"
25 #include "webkit/extensions/v8/interval_extension.h" 26 #include "webkit/extensions/v8/interval_extension.h"
26 #include "webkit/glue/simple_webmimeregistry_impl.h" 27 #include "webkit/glue/simple_webmimeregistry_impl.h"
(...skipping 11 matching lines...) Expand all
38 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" 39 #include "webkit/tools/test_shell/test_shell_webthemeengine.h"
39 #endif 40 #endif
40 41
41 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { 42 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
42 public: 43 public:
43 explicit TestShellWebKitInit(bool layout_test_mode) { 44 explicit TestShellWebKitInit(bool layout_test_mode) {
44 v8::V8::SetCounterFunction(StatsTable::FindLocation); 45 v8::V8::SetCounterFunction(StatsTable::FindLocation);
45 46
46 WebKit::initialize(this); 47 WebKit::initialize(this);
47 WebKit::setLayoutTestMode(layout_test_mode); 48 WebKit::setLayoutTestMode(layout_test_mode);
48 WebKit::registerURLSchemeAsLocal( 49 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal(
49 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); 50 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol()));
50 WebKit::registerURLSchemeAsNoAccess( 51 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess(
51 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); 52 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol()));
52 WebKit::enableV8SingleThreadMode(); 53 WebKit::enableV8SingleThreadMode();
53 WebKit::registerExtension(extensions_v8::GearsExtension::Get()); 54 WebKit::registerExtension(extensions_v8::GearsExtension::Get());
54 WebKit::registerExtension(extensions_v8::IntervalExtension::Get()); 55 WebKit::registerExtension(extensions_v8::IntervalExtension::Get());
55 WebKit::enableWebSockets(); 56 WebKit::enableWebSockets();
56 57
57 // Load libraries for media and enable the media player. 58 // Load libraries for media and enable the media player.
58 FilePath module_path; 59 FilePath module_path;
59 if (PathService::Get(base::DIR_MODULE, &module_path) && 60 if (PathService::Get(base::DIR_MODULE, &module_path) &&
60 media::InitializeMediaLibrary(module_path)) { 61 media::InitializeMediaLibrary(module_path)) {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 SimpleAppCacheSystem appcache_system_; 232 SimpleAppCacheSystem appcache_system_;
232 SimpleDatabaseSystem database_system_; 233 SimpleDatabaseSystem database_system_;
233 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; 234 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
234 235
235 #if defined(OS_WIN) 236 #if defined(OS_WIN)
236 WebKit::WebThemeEngine* active_theme_engine_; 237 WebKit::WebThemeEngine* active_theme_engine_;
237 #endif 238 #endif
238 }; 239 };
239 240
240 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ 241 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698