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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 } | 797 } |
798 | 798 |
799 // FileSystem | 799 // FileSystem |
800 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 800 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
801 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 801 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
802 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 802 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
803 test_environment->webkit_platform_support()->fileSystem()); | 803 test_environment->webkit_platform_support()->fileSystem()); |
804 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 804 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
805 } | 805 } |
806 | 806 |
| 807 void DeleteFileSystem(WebFrame* frame, WebFileSystem::Type type, |
| 808 WebFileSystemCallbacks* callbacks) { |
| 809 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 810 test_environment->webkit_platform_support()->fileSystem()); |
| 811 fileSystem->DeleteFileSystem(frame, type, callbacks); |
| 812 } |
| 813 |
807 WebKit::WebString RegisterIsolatedFileSystem( | 814 WebKit::WebString RegisterIsolatedFileSystem( |
808 const WebKit::WebVector<WebKit::WebString>& filenames) { | 815 const WebKit::WebVector<WebKit::WebString>& filenames) { |
809 fileapi::IsolatedContext::FileInfoSet files; | 816 fileapi::IsolatedContext::FileInfoSet files; |
810 for (size_t i = 0; i < filenames.size(); ++i) { | 817 for (size_t i = 0; i < filenames.size(); ++i) { |
811 FilePath path = webkit_glue::WebStringToFilePath(filenames[i]); | 818 FilePath path = webkit_glue::WebStringToFilePath(filenames[i]); |
812 files.AddPath(path, NULL); | 819 files.AddPath(path, NULL); |
813 } | 820 } |
814 std::string filesystemId = | 821 std::string filesystemId = |
815 fileapi::IsolatedContext::GetInstance()->RegisterDraggedFileSystem(files); | 822 fileapi::IsolatedContext::GetInstance()->RegisterDraggedFileSystem(files); |
816 return UTF8ToUTF16(filesystemId); | 823 return UTF8ToUTF16(filesystemId); |
(...skipping 15 matching lines...) Expand all Loading... |
832 // Logging | 839 // Logging |
833 void EnableWebCoreLogChannels(const std::string& channels) { | 840 void EnableWebCoreLogChannels(const std::string& channels) { |
834 webkit_glue::EnableWebCoreLogChannels(channels); | 841 webkit_glue::EnableWebCoreLogChannels(channels); |
835 } | 842 } |
836 | 843 |
837 void SetGamepadData(const WebKit::WebGamepads& pads) { | 844 void SetGamepadData(const WebKit::WebGamepads& pads) { |
838 test_environment->webkit_platform_support()->setGamepadData(pads); | 845 test_environment->webkit_platform_support()->setGamepadData(pads); |
839 } | 846 } |
840 | 847 |
841 } // namespace webkit_support | 848 } // namespace webkit_support |
OLD | NEW |