OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SUPPORT_WEBIT_SUPPORT_H_ | 5 #ifndef WEBKIT_SUPPORT_WEBIT_SUPPORT_H_ |
6 #define WEBKIT_SUPPORT_WEBIT_SUPPORT_H_ | 6 #define WEBKIT_SUPPORT_WEBIT_SUPPORT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 // Converts file:///tmp/LayoutTests URLs to the actual location on disk. | 148 // Converts file:///tmp/LayoutTests URLs to the actual location on disk. |
149 WebKit::WebURL RewriteLayoutTestsURL(const std::string& utf8_url); | 149 WebKit::WebURL RewriteLayoutTestsURL(const std::string& utf8_url); |
150 | 150 |
151 // Set the directory of specified file: URL as the current working directory. | 151 // Set the directory of specified file: URL as the current working directory. |
152 bool SetCurrentDirectoryForFileURL(const WebKit::WebURL& fileUrl); | 152 bool SetCurrentDirectoryForFileURL(const WebKit::WebURL& fileUrl); |
153 | 153 |
154 // Convert a file:/// URL to a base64 encoded data: URL. | 154 // Convert a file:/// URL to a base64 encoded data: URL. |
155 WebKit::WebURL LocalFileToDataURL(const WebKit::WebURL& fileUrl); | 155 WebKit::WebURL LocalFileToDataURL(const WebKit::WebURL& fileUrl); |
156 | 156 |
| 157 // Scoped temporary directories for use by webkit layout tests. |
| 158 class ScopedTempDirectory { |
| 159 public: |
| 160 virtual ~ScopedTempDirectory() {} |
| 161 virtual bool CreateUniqueTempDir() = 0; |
| 162 virtual std::string path() const = 0; |
| 163 }; |
| 164 |
| 165 ScopedTempDirectory* CreateScopedTempDirectory(); |
| 166 |
157 // -------- Time | 167 // -------- Time |
158 int64 GetCurrentTimeInMillisecond(); | 168 int64 GetCurrentTimeInMillisecond(); |
159 | 169 |
160 // -------- Net | 170 // -------- Net |
161 // A wrapper of net::EscapePath(). | 171 // A wrapper of net::EscapePath(). |
162 std::string EscapePath(const std::string& path); | 172 std::string EscapePath(const std::string& path); |
163 // Make an error description for layout tests. | 173 // Make an error description for layout tests. |
164 std::string MakeURLErrorDescription(const WebKit::WebURLError& error); | 174 std::string MakeURLErrorDescription(const WebKit::WebURLError& error); |
165 // Creates WebURLError for an aborted request. | 175 // Creates WebURLError for an aborted request. |
166 WebKit::WebURLError CreateCancelledError(const WebKit::WebURLRequest& request); | 176 WebKit::WebURLError CreateCancelledError(const WebKit::WebURLRequest& request); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 VKEY_F1 = ui::VKEY_F1, | 212 VKEY_F1 = ui::VKEY_F1, |
203 }; | 213 }; |
204 | 214 |
205 // - Timers | 215 // - Timers |
206 | 216 |
207 double GetForegroundTabTimerInterval(); | 217 double GetForegroundTabTimerInterval(); |
208 | 218 |
209 } // namespace webkit_support | 219 } // namespace webkit_support |
210 | 220 |
211 #endif // WEBKIT_SUPPORT_WEBIT_CLIENT_IMPL_H_ | 221 #endif // WEBKIT_SUPPORT_WEBIT_CLIENT_IMPL_H_ |
OLD | NEW |