| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "base/compiler_specific.h" |
| 7 |
| 8 #include "webkit/glue/glue_util.h" |
| 9 |
| 6 #include <string> | 10 #include <string> |
| 7 | 11 |
| 8 #include "webkit/glue/glue_util.h" | 12 MSVC_PUSH_WARNING_LEVEL(0); |
| 13 #include "CString.h" |
| 14 #include "IntRect.h" |
| 15 #include "PlatformString.h" |
| 16 #include "KURL.h" |
| 17 MSVC_POP_WARNING(); |
| 18 |
| 19 #undef LOG |
| 20 |
| 9 #include "base/compiler_specific.h" | 21 #include "base/compiler_specific.h" |
| 10 #include "base/gfx/rect.h" | 22 #include "base/gfx/rect.h" |
| 11 #include "base/string_piece.h" | 23 #include "base/string_piece.h" |
| 12 #include "base/string_util.h" | 24 #include "base/string_util.h" |
| 13 #include "base/sys_string_conversions.h" | 25 #include "base/sys_string_conversions.h" |
| 26 #include "googleurl/src/gurl.h" |
| 14 | 27 |
| 15 MSVC_PUSH_WARNING_LEVEL(0); | |
| 16 #undef LOG | |
| 17 #include "CString.h" | |
| 18 #include "IntRect.h" | |
| 19 #include "PlatformString.h" | |
| 20 MSVC_POP_WARNING(); | |
| 21 | |
| 22 #include "KURL.h" | |
| 23 | 28 |
| 24 namespace webkit_glue { | 29 namespace webkit_glue { |
| 25 | 30 |
| 26 // String conversions ---------------------------------------------------------- | 31 // String conversions ---------------------------------------------------------- |
| 27 | 32 |
| 28 std::string CStringToStdString(const WebCore::CString& str) { | 33 std::string CStringToStdString(const WebCore::CString& str) { |
| 29 const char* chars = str.data(); | 34 const char* chars = str.data(); |
| 30 return std::string(chars ? chars : "", str.length()); | 35 return std::string(chars ? chars : "", str.length()); |
| 31 } | 36 } |
| 32 | 37 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return gfx::Rect(r.x(), r.y(), r.width() < 0 ? 0 : r.width(), | 133 return gfx::Rect(r.x(), r.y(), r.width() < 0 ? 0 : r.width(), |
| 129 r.height() < 0 ? 0 : r.height()); | 134 r.height() < 0 ? 0 : r.height()); |
| 130 } | 135 } |
| 131 | 136 |
| 132 WebCore::IntRect ToIntRect(const gfx::Rect& r) { | 137 WebCore::IntRect ToIntRect(const gfx::Rect& r) { |
| 133 return WebCore::IntRect(r.x(), r.y(), r.width(), r.height()); | 138 return WebCore::IntRect(r.x(), r.y(), r.width(), r.height()); |
| 134 } | 139 } |
| 135 | 140 |
| 136 } // namespace webkit_glue | 141 } // namespace webkit_glue |
| 137 | 142 |
| OLD | NEW |