OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "media/base/filter_collection.h" | 31 #include "media/base/filter_collection.h" |
32 #include "media/base/media_log.h" | 32 #include "media/base/media_log.h" |
33 #include "media/base/message_loop_factory_impl.h" | 33 #include "media/base/message_loop_factory_impl.h" |
34 #include "net/base/escape.h" | 34 #include "net/base/escape.h" |
35 #include "net/base/net_errors.h" | 35 #include "net/base/net_errors.h" |
36 #include "net/base/net_util.h" | 36 #include "net/base/net_util.h" |
37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" |
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
43 #if defined(TOOLKIT_USES_GTK) | 44 #if defined(TOOLKIT_USES_GTK) |
44 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" | 45 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
45 #endif | 46 #endif |
46 #include "ui/gfx/gl/gl_context.h" | 47 #include "ui/gfx/gl/gl_context.h" |
47 #include "ui/gfx/gl/gl_implementation.h" | 48 #include "ui/gfx/gl/gl_implementation.h" |
48 #include "ui/gfx/gl/gl_surface.h" | 49 #include "ui/gfx/gl/gl_surface.h" |
49 #include "webkit/appcache/web_application_cache_host_impl.h" | 50 #include "webkit/appcache/web_application_cache_host_impl.h" |
50 #include "webkit/glue/user_agent.h" | 51 #include "webkit/glue/user_agent.h" |
51 #include "webkit/glue/webkit_constants.h" | 52 #include "webkit/glue/webkit_constants.h" |
52 #include "webkit/glue/webkit_glue.h" | 53 #include "webkit/glue/webkit_glue.h" |
53 #include "webkit/glue/webkitplatformsupport_impl.h" | 54 #include "webkit/glue/webkitplatformsupport_impl.h" |
54 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 55 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
55 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 56 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
56 #include "webkit/media/webmediaplayer_impl.h" | 57 #include "webkit/media/webmediaplayer_impl.h" |
57 #include "webkit/plugins/npapi/plugin_list.h" | 58 #include "webkit/plugins/npapi/plugin_list.h" |
58 #include "webkit/plugins/npapi/webplugin_impl.h" | 59 #include "webkit/plugins/npapi/webplugin_impl.h" |
59 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | 60 #include "webkit/plugins/npapi/webplugin_page_delegate.h" |
60 #include "webkit/plugins/webplugininfo.h" | 61 #include "webkit/plugins/webplugininfo.h" |
61 #include "webkit/support/platform_support.h" | 62 #include "webkit/support/platform_support.h" |
62 #include "webkit/support/simple_database_system.h" | 63 #include "webkit/support/simple_database_system.h" |
63 #include "webkit/support/test_webkit_platform_support.h" | 64 #include "webkit/support/test_webkit_platform_support.h" |
64 #include "webkit/support/test_webplugin_page_delegate.h" | 65 #include "webkit/support/test_webplugin_page_delegate.h" |
| 66 #include "webkit/tools/test_shell/simple_appcache_system.h" |
| 67 #include "webkit/tools/test_shell/simple_dom_storage_system.h" |
65 #include "webkit/tools/test_shell/simple_file_system.h" | 68 #include "webkit/tools/test_shell/simple_file_system.h" |
66 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 69 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
67 | 70 |
68 using WebKit::WebCString; | 71 using WebKit::WebCString; |
69 using WebKit::WebDevToolsAgentClient; | 72 using WebKit::WebDevToolsAgentClient; |
70 using WebKit::WebFileSystem; | 73 using WebKit::WebFileSystem; |
71 using WebKit::WebFileSystemCallbacks; | 74 using WebKit::WebFileSystemCallbacks; |
72 using WebKit::WebFrame; | 75 using WebKit::WebFrame; |
73 using WebKit::WebMediaPlayerClient; | 76 using WebKit::WebMediaPlayerClient; |
74 using WebKit::WebPlugin; | 77 using WebKit::WebPlugin; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 WebFrame* frame, | 346 WebFrame* frame, |
344 WebMediaPlayerClient* client) { | 347 WebMediaPlayerClient* client) { |
345 return CreateMediaPlayer(frame, client, NULL); | 348 return CreateMediaPlayer(frame, client, NULL); |
346 } | 349 } |
347 | 350 |
348 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 351 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
349 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 352 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
350 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 353 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
351 } | 354 } |
352 | 355 |
| 356 WebKit::WebStorageNamespace* CreateSessionStorageNamespace(unsigned quota) { |
| 357 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 358 return SimpleDomStorageSystem::instance().CreateSessionStorageNamespace(); |
| 359 #else |
| 360 return WebKit::WebStorageNamespace::createSessionStorageNamespace(quota); |
| 361 #endif |
| 362 } |
| 363 |
353 WebKit::WebString GetWebKitRootDir() { | 364 WebKit::WebString GetWebKitRootDir() { |
354 FilePath path = GetWebKitRootDirFilePath(); | 365 FilePath path = GetWebKitRootDirFilePath(); |
355 std::string path_ascii = path.MaybeAsASCII(); | 366 std::string path_ascii = path.MaybeAsASCII(); |
356 CHECK(!path_ascii.empty()); | 367 CHECK(!path_ascii.empty()); |
357 return WebKit::WebString::fromUTF8(path_ascii.c_str()); | 368 return WebKit::WebString::fromUTF8(path_ascii.c_str()); |
358 } | 369 } |
359 | 370 |
360 void SetUpGLBindings(GLBindingPreferences bindingPref) { | 371 void SetUpGLBindings(GLBindingPreferences bindingPref) { |
361 switch (bindingPref) { | 372 switch (bindingPref) { |
362 case GL_BINDING_DEFAULT: | 373 case GL_BINDING_DEFAULT: |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 // Logging | 694 // Logging |
684 void EnableWebCoreLogChannels(const std::string& channels) { | 695 void EnableWebCoreLogChannels(const std::string& channels) { |
685 webkit_glue::EnableWebCoreLogChannels(channels); | 696 webkit_glue::EnableWebCoreLogChannels(channels); |
686 } | 697 } |
687 | 698 |
688 void SetGamepadData(const WebKit::WebGamepads& pads) { | 699 void SetGamepadData(const WebKit::WebGamepads& pads) { |
689 test_environment->webkit_platform_support()->setGamepadData(pads); | 700 test_environment->webkit_platform_support()->setGamepadData(pads); |
690 } | 701 } |
691 | 702 |
692 } // namespace webkit_support | 703 } // namespace webkit_support |
OLD | NEW |