OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_GLUE_GLUE_UTIL_H_ | 5 #ifndef WEBKIT_GLUE_GLUE_UTIL_H_ |
6 #define WEBKIT_GLUE_GLUE_UTIL_H_ | 6 #define WEBKIT_GLUE_GLUE_UTIL_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 | 12 |
13 namespace WebCore { | 13 namespace WebCore { |
14 class ChromiumDataObject; | 14 class ChromiumDataObject; |
15 class CString; | 15 class CString; |
16 class HistoryItem; | 16 class HistoryItem; |
17 class HTMLFormElement; | 17 class HTMLFormElement; |
18 class IntPoint; | 18 class IntPoint; |
19 class IntRect; | 19 class IntRect; |
20 class IntSize; | 20 class IntSize; |
21 class KURL; | 21 class KURL; |
22 class ResourceError; | 22 class ResourceError; |
23 class ResourceResponse; | 23 class ResourceResponse; |
| 24 class SharedBuffer; |
24 class String; | 25 class String; |
25 struct ResourceRequest; | 26 struct ResourceRequest; |
26 } | 27 } |
27 | 28 |
28 namespace WebKit { | 29 namespace WebKit { |
29 class WebCString; | 30 class WebCString; |
| 31 class WebData; |
30 class WebDragData; | 32 class WebDragData; |
31 class WebForm; | 33 class WebForm; |
32 class WebHistoryItem; | 34 class WebHistoryItem; |
33 class WebString; | 35 class WebString; |
34 class WebURL; | 36 class WebURL; |
35 class WebURLRequest; | 37 class WebURLRequest; |
36 class WebURLResponse; | 38 class WebURLResponse; |
37 struct WebPoint; | 39 struct WebPoint; |
38 struct WebRect; | 40 struct WebRect; |
39 struct WebSize; | 41 struct WebSize; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 WebCore::String WebStringToString(const WebKit::WebString& str); | 77 WebCore::String WebStringToString(const WebKit::WebString& str); |
76 | 78 |
77 // WebCore::CString <-> WebCString. No charset conversion. | 79 // WebCore::CString <-> WebCString. No charset conversion. |
78 WebKit::WebCString CStringToWebCString(const WebCore::CString& str); | 80 WebKit::WebCString CStringToWebCString(const WebCore::CString& str); |
79 WebCore::CString WebCStringToCString(const WebKit::WebCString& str); | 81 WebCore::CString WebCStringToCString(const WebKit::WebCString& str); |
80 | 82 |
81 // std::string <-> WebString. Conversion to/from UTF-8. | 83 // std::string <-> WebString. Conversion to/from UTF-8. |
82 WebKit::WebString StdStringToWebString(const std::string& str); | 84 WebKit::WebString StdStringToWebString(const std::string& str); |
83 std::string WebStringToStdString(const WebKit::WebString& str); | 85 std::string WebStringToStdString(const WebKit::WebString& str); |
84 | 86 |
| 87 // WebCore::SharedBuffer <-> WebData. No charset conversion. |
| 88 WebKit::WebData SharedBufferToWebData( |
| 89 const WTF::PassRefPtr<WebCore::SharedBuffer>& buf); |
| 90 WTF::PassRefPtr<WebCore::SharedBuffer> WebDataToSharedBuffer( |
| 91 const WebKit::WebData& data); |
| 92 |
85 FilePath::StringType StringToFilePathString(const WebCore::String& str); | 93 FilePath::StringType StringToFilePathString(const WebCore::String& str); |
86 WebCore::String FilePathStringToString(const FilePath::StringType& str); | 94 WebCore::String FilePathStringToString(const FilePath::StringType& str); |
87 | 95 |
88 GURL KURLToGURL(const WebCore::KURL& url); | 96 GURL KURLToGURL(const WebCore::KURL& url); |
89 WebCore::KURL GURLToKURL(const GURL& url); | 97 WebCore::KURL GURLToKURL(const GURL& url); |
90 GURL StringToGURL(const WebCore::String& spec); | 98 GURL StringToGURL(const WebCore::String& spec); |
91 | 99 |
92 WebKit::WebURL KURLToWebURL(const WebCore::KURL& url); | 100 WebKit::WebURL KURLToWebURL(const WebCore::KURL& url); |
93 WebCore::KURL WebURLToKURL(const WebKit::WebURL& url); | 101 WebCore::KURL WebURLToKURL(const WebKit::WebURL& url); |
94 | 102 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 147 |
140 // Exposes the ResourceResponse contained by a WebURLResponse | 148 // Exposes the ResourceResponse contained by a WebURLResponse |
141 WebCore::ResourceResponse* WebURLResponseToMutableResourceResponse( | 149 WebCore::ResourceResponse* WebURLResponseToMutableResourceResponse( |
142 WebKit::WebURLResponse* resp); | 150 WebKit::WebURLResponse* resp); |
143 const WebCore::ResourceResponse* WebURLResponseToResourceResponse( | 151 const WebCore::ResourceResponse* WebURLResponseToResourceResponse( |
144 const WebKit::WebURLResponse* resp); | 152 const WebKit::WebURLResponse* resp); |
145 | 153 |
146 } // namespace webkit_glue | 154 } // namespace webkit_glue |
147 | 155 |
148 #endif // #ifndef WEBKIT_GLUE_GLUE_UTIL_H_ | 156 #endif // #ifndef WEBKIT_GLUE_GLUE_UTIL_H_ |
OLD | NEW |