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

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

Issue 3282003: Support handling blob URL and resolve blob references in upload data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #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/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" 11 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
12 #include "webkit/glue/webclipboard_impl.h" 12 #include "webkit/glue/webclipboard_impl.h"
13 #include "webkit/glue/webfileutilities_impl.h" 13 #include "webkit/glue/webfileutilities_impl.h"
14 #include "webkit/glue/webkit_glue.h" 14 #include "webkit/glue/webkit_glue.h"
15 #include "webkit/glue/webkitclient_impl.h" 15 #include "webkit/glue/webkitclient_impl.h"
16 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" 16 #include "webkit/tools/test_shell/mock_webclipboard_impl.h"
17 #include "webkit/tools/test_shell/simple_appcache_system.h" 17 #include "webkit/tools/test_shell/simple_appcache_system.h"
18 #include "webkit/tools/test_shell/simple_database_system.h" 18 #include "webkit/tools/test_shell/simple_database_system.h"
19 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 19 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
20 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" 20 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h"
21 #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h"
21 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" 22 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h"
22 23
23 #if defined(OS_WIN) 24 #if defined(OS_WIN)
24 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" 25 #include "webkit/tools/test_shell/test_shell_webthemeengine.h"
25 #endif 26 #endif
26 27
27 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { 28 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
28 public: 29 public:
29 explicit TestShellWebKitInit(bool layout_test_mode); 30 explicit TestShellWebKitInit(bool layout_test_mode);
30 ~TestShellWebKitInit(); 31 ~TestShellWebKitInit();
31 32
32 virtual WebKit::WebMimeRegistry* mimeRegistry() { 33 virtual WebKit::WebMimeRegistry* mimeRegistry() {
33 return &mime_registry_; 34 return &mime_registry_;
34 } 35 }
35 36
36 WebKit::WebClipboard* clipboard(); 37 WebKit::WebClipboard* clipboard();
37 38
38 virtual WebKit::WebFileUtilities* fileUtilities() { 39 virtual WebKit::WebFileUtilities* fileUtilities() {
39 return &file_utilities_; 40 return &file_utilities_;
40 } 41 }
41 42
42 virtual WebKit::WebSandboxSupport* sandboxSupport() { 43 virtual WebKit::WebSandboxSupport* sandboxSupport() {
43 return NULL; 44 return NULL;
44 } 45 }
45 46
46 virtual WebKit::WebCookieJar* cookieJar() { 47 virtual WebKit::WebCookieJar* cookieJar() {
47 return &cookie_jar_; 48 return &cookie_jar_;
48 } 49 }
49 50
51 virtual WebKit::WebBlobRegistry* blobRegistry() {
52 return web_blob_registry_.get();
53 }
54
50 virtual bool sandboxEnabled() { 55 virtual bool sandboxEnabled() {
51 return true; 56 return true;
52 } 57 }
53 58
54 virtual WebKit::WebKitClient::FileHandle databaseOpenFile( 59 virtual WebKit::WebKitClient::FileHandle databaseOpenFile(
55 const WebKit::WebString& vfs_file_name, int desired_flags) { 60 const WebKit::WebString& vfs_file_name, int desired_flags) {
56 return SimpleDatabaseSystem::GetInstance()->OpenFile( 61 return SimpleDatabaseSystem::GetInstance()->OpenFile(
57 vfs_file_name, desired_flags); 62 vfs_file_name, desired_flags);
58 } 63 }
59 64
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 139
135 private: 140 private:
136 TestShellWebMimeRegistryImpl mime_registry_; 141 TestShellWebMimeRegistryImpl mime_registry_;
137 MockWebClipboardImpl mock_clipboard_; 142 MockWebClipboardImpl mock_clipboard_;
138 webkit_glue::WebClipboardImpl real_clipboard_; 143 webkit_glue::WebClipboardImpl real_clipboard_;
139 webkit_glue::WebFileUtilitiesImpl file_utilities_; 144 webkit_glue::WebFileUtilitiesImpl file_utilities_;
140 ScopedTempDir appcache_dir_; 145 ScopedTempDir appcache_dir_;
141 SimpleAppCacheSystem appcache_system_; 146 SimpleAppCacheSystem appcache_system_;
142 SimpleDatabaseSystem database_system_; 147 SimpleDatabaseSystem database_system_;
143 SimpleWebCookieJarImpl cookie_jar_; 148 SimpleWebCookieJarImpl cookie_jar_;
149 scoped_refptr<TestShellWebBlobRegistryImpl> web_blob_registry_;
michaeln 2010/08/31 01:27:22 just blob_registry_ no need for the "web" prefix
144 150
145 #if defined(OS_WIN) 151 #if defined(OS_WIN)
146 WebKit::WebThemeEngine* active_theme_engine_; 152 WebKit::WebThemeEngine* active_theme_engine_;
147 #endif 153 #endif
148 }; 154 };
149 155
150 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ 156 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698