| 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 // TODO(darin): This file will be deleted once we complete the move to | 5 // TODO(darin): This file will be deleted once we complete the move to |
| 6 // webkit/api | 6 // webkit/api |
| 7 | 7 |
| 8 // In this file, we pretend to be part of the WebKit implementation. | 8 // In this file, we pretend to be part of the WebKit implementation. |
| 9 // This is just a temporary hack while glue is still being moved into | 9 // This is just a temporary hack while glue is still being moved into |
| 10 // webkit/api. | 10 // webkit/api. |
| 11 #define WEBKIT_IMPLEMENTATION 1 | 11 #define WEBKIT_IMPLEMENTATION 1 |
| 12 | 12 |
| 13 #include "config.h" | 13 #include "config.h" |
| 14 #include "webkit/glue/glue_util.h" | 14 #include "webkit/glue/glue_util.h" |
| 15 | 15 |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "ChromiumDataObject.h" | 18 #include "ChromiumDataObject.h" |
| 19 #include "CString.h" | 19 #include "CString.h" |
| 20 #include "HistoryItem.h" | 20 #include "HistoryItem.h" |
| 21 #include "HTMLFormElement.h" | 21 #include "HTMLFormElement.h" |
| 22 #include "IntPoint.h" | 22 #include "IntPoint.h" |
| 23 #include "IntRect.h" | 23 #include "IntRect.h" |
| 24 #include "KURL.h" | 24 #include "KURL.h" |
| 25 #include "Node.h" | 25 #include "Node.h" |
| 26 #include "PlatformString.h" | 26 #include "PlatformString.h" |
| 27 #include "Range.h" |
| 27 #include "ResourceError.h" | 28 #include "ResourceError.h" |
| 28 | 29 |
| 29 #undef LOG | 30 #undef LOG |
| 30 #include "base/compiler_specific.h" | 31 #include "base/compiler_specific.h" |
| 31 #include "base/gfx/rect.h" | 32 #include "base/gfx/rect.h" |
| 32 #include "base/string_piece.h" | 33 #include "base/string_piece.h" |
| 33 #include "base/string_util.h" | 34 #include "base/string_util.h" |
| 34 #include "base/sys_string_conversions.h" | 35 #include "base/sys_string_conversions.h" |
| 35 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
| 36 #include "webkit/api/public/WebCursorInfo.h" | 37 #include "webkit/api/public/WebCursorInfo.h" |
| 37 #include "webkit/api/public/WebDragData.h" | 38 #include "webkit/api/public/WebDragData.h" |
| 38 #include "webkit/api/public/WebForm.h" | 39 #include "webkit/api/public/WebForm.h" |
| 39 #include "webkit/api/public/WebHistoryItem.h" | 40 #include "webkit/api/public/WebHistoryItem.h" |
| 40 #include "webkit/api/public/WebNode.h" | 41 #include "webkit/api/public/WebNode.h" |
| 41 #include "webkit/api/public/WebPoint.h" | 42 #include "webkit/api/public/WebPoint.h" |
| 43 #include "webkit/api/public/WebRange.h" |
| 42 #include "webkit/api/public/WebRect.h" | 44 #include "webkit/api/public/WebRect.h" |
| 43 #include "webkit/api/public/WebSize.h" | 45 #include "webkit/api/public/WebSize.h" |
| 44 #include "webkit/api/public/WebString.h" | 46 #include "webkit/api/public/WebString.h" |
| 45 #include "webkit/api/public/WebURL.h" | 47 #include "webkit/api/public/WebURL.h" |
| 46 #include "webkit/api/public/WebURLError.h" | 48 #include "webkit/api/public/WebURLError.h" |
| 47 #include "webkit/api/public/WebURLRequest.h" | 49 #include "webkit/api/public/WebURLRequest.h" |
| 48 #include "webkit/api/public/WebURLResponse.h" | 50 #include "webkit/api/public/WebURLResponse.h" |
| 49 | 51 |
| 50 namespace webkit_glue { | 52 namespace webkit_glue { |
| 51 | 53 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 const WTF::PassRefPtr<WebCore::HTMLFormElement>& form) { | 259 const WTF::PassRefPtr<WebCore::HTMLFormElement>& form) { |
| 258 return form; | 260 return form; |
| 259 } | 261 } |
| 260 | 262 |
| 261 WTF::PassRefPtr<WebCore::HTMLFormElement> WebFormToHTMLFormElement( | 263 WTF::PassRefPtr<WebCore::HTMLFormElement> WebFormToHTMLFormElement( |
| 262 const WebKit::WebForm& form) { | 264 const WebKit::WebForm& form) { |
| 263 return form; | 265 return form; |
| 264 } | 266 } |
| 265 | 267 |
| 266 // WebNode conversions --------------------------------------------------------- | 268 // WebNode conversions --------------------------------------------------------- |
| 269 |
| 267 WebKit::WebNode NodeToWebNode(const WTF::PassRefPtr<WebCore::Node>& node) { | 270 WebKit::WebNode NodeToWebNode(const WTF::PassRefPtr<WebCore::Node>& node) { |
| 268 return node; | 271 return node; |
| 269 } | 272 } |
| 273 |
| 270 WTF::PassRefPtr<WebCore::Node> WebNodeToNode(const WebKit::WebNode& node) { | 274 WTF::PassRefPtr<WebCore::Node> WebNodeToNode(const WebKit::WebNode& node) { |
| 271 return node; | 275 return node; |
| 272 } | 276 } |
| 273 | 277 |
| 274 // WebHistoryItem conversions -------------------------------------------------- | 278 // WebHistoryItem conversions -------------------------------------------------- |
| 275 | 279 |
| 276 WebKit::WebHistoryItem HistoryItemToWebHistoryItem( | 280 WebKit::WebHistoryItem HistoryItemToWebHistoryItem( |
| 277 const WTF::PassRefPtr<WebCore::HistoryItem>& item) { | 281 const WTF::PassRefPtr<WebCore::HistoryItem>& item) { |
| 278 return item; | 282 return item; |
| 279 } | 283 } |
| 280 | 284 |
| 281 WTF::PassRefPtr<WebCore::HistoryItem> WebHistoryItemToHistoryItem( | 285 WTF::PassRefPtr<WebCore::HistoryItem> WebHistoryItemToHistoryItem( |
| 282 const WebKit::WebHistoryItem& item) { | 286 const WebKit::WebHistoryItem& item) { |
| 283 return item; | 287 return item; |
| 284 } | 288 } |
| 285 | 289 |
| 290 // WebRange conversions -------------------------------------------------------- |
| 291 |
| 292 WebKit::WebRange RangeToWebRange(const WTF::PassRefPtr<WebCore::Range>& range) { |
| 293 return range; |
| 294 } |
| 295 |
| 296 WTF::PassRefPtr<WebCore::Range> WebRangeToRange(const WebKit::WebRange& range) { |
| 297 return range; |
| 298 } |
| 299 |
| 286 // WebURLError conversions ----------------------------------------------------- | 300 // WebURLError conversions ----------------------------------------------------- |
| 287 | 301 |
| 288 WebKit::WebURLError ResourceErrorToWebURLError( | 302 WebKit::WebURLError ResourceErrorToWebURLError( |
| 289 const WebCore::ResourceError& error) { | 303 const WebCore::ResourceError& error) { |
| 290 return error; | 304 return error; |
| 291 } | 305 } |
| 292 | 306 |
| 293 WebCore::ResourceError WebURLErrorToResourceError( | 307 WebCore::ResourceError WebURLErrorToResourceError( |
| 294 const WebKit::WebURLError& error) { | 308 const WebKit::WebURLError& error) { |
| 295 return error; | 309 return error; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 313 WebKit::WebURLResponse* response) { | 327 WebKit::WebURLResponse* response) { |
| 314 return &response->toMutableResourceResponse(); | 328 return &response->toMutableResourceResponse(); |
| 315 } | 329 } |
| 316 | 330 |
| 317 const WebCore::ResourceResponse* WebURLResponseToResourceResponse( | 331 const WebCore::ResourceResponse* WebURLResponseToResourceResponse( |
| 318 const WebKit::WebURLResponse* response) { | 332 const WebKit::WebURLResponse* response) { |
| 319 return &response->toResourceResponse(); | 333 return &response->toResourceResponse(); |
| 320 } | 334 } |
| 321 | 335 |
| 322 } // namespace webkit_glue | 336 } // namespace webkit_glue |
| OLD | NEW |