| 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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 795 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 796 test_environment->webkit_platform_support()->fileSystem()); | 796 test_environment->webkit_platform_support()->fileSystem()); |
| 797 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 797 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 798 } | 798 } |
| 799 | 799 |
| 800 WebKit::WebString RegisterIsolatedFileSystem( | 800 WebKit::WebString RegisterIsolatedFileSystem( |
| 801 const WebKit::WebVector<WebKit::WebString>& filenames) { | 801 const WebKit::WebVector<WebKit::WebString>& filenames) { |
| 802 fileapi::IsolatedContext::FileInfoSet files; | 802 fileapi::IsolatedContext::FileInfoSet files; |
| 803 for (size_t i = 0; i < filenames.size(); ++i) { | 803 for (size_t i = 0; i < filenames.size(); ++i) { |
| 804 FilePath path = webkit_glue::WebStringToFilePath(filenames[i]); | 804 FilePath path = webkit_glue::WebStringToFilePath(filenames[i]); |
| 805 files.AddPath(path); | 805 files.AddPath(path, NULL); |
| 806 } | 806 } |
| 807 std::string filesystemId = | 807 std::string filesystemId = |
| 808 fileapi::IsolatedContext::GetInstance()->RegisterFileSystem(files); | 808 fileapi::IsolatedContext::GetInstance()->RegisterDraggedFileSystem(files); |
| 809 return UTF8ToUTF16(filesystemId); | 809 return UTF8ToUTF16(filesystemId); |
| 810 } | 810 } |
| 811 | 811 |
| 812 // Keyboard code | 812 // Keyboard code |
| 813 #if defined(TOOLKIT_GTK) | 813 #if defined(TOOLKIT_GTK) |
| 814 int NativeKeyCodeForWindowsKeyCode(int keycode, bool shift) { | 814 int NativeKeyCodeForWindowsKeyCode(int keycode, bool shift) { |
| 815 ui::KeyboardCode code = static_cast<ui::KeyboardCode>(keycode); | 815 ui::KeyboardCode code = static_cast<ui::KeyboardCode>(keycode); |
| 816 return ui::GdkNativeKeyCodeForWindowsKeyCode(code, shift); | 816 return ui::GdkNativeKeyCodeForWindowsKeyCode(code, shift); |
| 817 } | 817 } |
| 818 #endif | 818 #endif |
| 819 | 819 |
| 820 // Timers | 820 // Timers |
| 821 double GetForegroundTabTimerInterval() { | 821 double GetForegroundTabTimerInterval() { |
| 822 return webkit_glue::kForegroundTabTimerInterval; | 822 return webkit_glue::kForegroundTabTimerInterval; |
| 823 } | 823 } |
| 824 | 824 |
| 825 // Logging | 825 // Logging |
| 826 void EnableWebCoreLogChannels(const std::string& channels) { | 826 void EnableWebCoreLogChannels(const std::string& channels) { |
| 827 webkit_glue::EnableWebCoreLogChannels(channels); | 827 webkit_glue::EnableWebCoreLogChannels(channels); |
| 828 } | 828 } |
| 829 | 829 |
| 830 void SetGamepadData(const WebKit::WebGamepads& pads) { | 830 void SetGamepadData(const WebKit::WebGamepads& pads) { |
| 831 test_environment->webkit_platform_support()->setGamepadData(pads); | 831 test_environment->webkit_platform_support()->setGamepadData(pads); |
| 832 } | 832 } |
| 833 | 833 |
| 834 } // namespace webkit_support | 834 } // namespace webkit_support |
| OLD | NEW |