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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 } | 867 } |
868 #if defined(OS_MACOSX) | 868 #if defined(OS_MACOSX) |
869 dirExe = dirExe.AppendASCII("../../.."); | 869 dirExe = dirExe.AppendASCII("../../.."); |
870 #endif | 870 #endif |
871 base::FilePath devToolsPath = dirExe.AppendASCII( | 871 base::FilePath devToolsPath = dirExe.AppendASCII( |
872 "resources/inspector/devtools.html"); | 872 "resources/inspector/devtools.html"); |
873 return net::FilePathToFileURL(devToolsPath); | 873 return net::FilePathToFileURL(devToolsPath); |
874 } | 874 } |
875 | 875 |
876 // FileSystem | 876 // FileSystem |
877 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 877 void OpenFileSystem(WebFrame* frame, |
| 878 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE |
| 879 WebKit::WebFileSystemType type, |
| 880 #else |
| 881 WebFileSystem::Type type, |
| 882 #endif |
878 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 883 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
879 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 884 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
880 test_environment->webkit_platform_support()->fileSystem()); | 885 test_environment->webkit_platform_support()->fileSystem()); |
881 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 886 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
882 } | 887 } |
883 | 888 |
884 void DeleteFileSystem(WebFrame* frame, WebFileSystem::Type type, | 889 void DeleteFileSystem(WebFrame* frame, |
| 890 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE |
| 891 WebKit::WebFileSystemType type, |
| 892 #else |
| 893 WebFileSystem::Type type, |
| 894 #endif |
885 WebFileSystemCallbacks* callbacks) { | 895 WebFileSystemCallbacks* callbacks) { |
886 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 896 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
887 test_environment->webkit_platform_support()->fileSystem()); | 897 test_environment->webkit_platform_support()->fileSystem()); |
888 fileSystem->DeleteFileSystem(frame, type, callbacks); | 898 fileSystem->DeleteFileSystem(frame, type, callbacks); |
889 } | 899 } |
890 | 900 |
891 WebKit::WebString RegisterIsolatedFileSystem( | 901 WebKit::WebString RegisterIsolatedFileSystem( |
892 const WebKit::WebVector<WebKit::WebString>& filenames) { | 902 const WebKit::WebVector<WebKit::WebString>& filenames) { |
893 fileapi::IsolatedContext::FileInfoSet files; | 903 fileapi::IsolatedContext::FileInfoSet files; |
894 for (size_t i = 0; i < filenames.size(); ++i) { | 904 for (size_t i = 0; i < filenames.size(); ++i) { |
(...skipping 21 matching lines...) Expand all Loading... |
916 // Logging | 926 // Logging |
917 void EnableWebCoreLogChannels(const std::string& channels) { | 927 void EnableWebCoreLogChannels(const std::string& channels) { |
918 webkit_glue::EnableWebCoreLogChannels(channels); | 928 webkit_glue::EnableWebCoreLogChannels(channels); |
919 } | 929 } |
920 | 930 |
921 void SetGamepadData(const WebKit::WebGamepads& pads) { | 931 void SetGamepadData(const WebKit::WebGamepads& pads) { |
922 test_environment->webkit_platform_support()->setGamepadData(pads); | 932 test_environment->webkit_platform_support()->setGamepadData(pads); |
923 } | 933 } |
924 | 934 |
925 } // namespace webkit_support | 935 } // namespace webkit_support |
OLD | NEW |