Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: public/platform/WebString.h

Issue 23456013: Expose latin1 methods in WebString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/chromium/support/WebString.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebString.h
diff --git a/public/platform/WebString.h b/public/platform/WebString.h
index bbddef5b8fb169229a84b04e6caec0a4e2b52d19..ef436099ed2bf0031c3d4a8f5e3240e0fe39a444 100644
--- a/public/platform/WebString.h
+++ b/public/platform/WebString.h
@@ -99,6 +99,15 @@ public:
return fromUTF8(s.data(), s.length());
}
+ BLINK_COMMON_EXPORT std::string latin1() const;
+
+ BLINK_COMMON_EXPORT static WebString fromLatin1(const WebLChar* data, size_t length);
+
+ static WebString fromLatin1(const std::string& s)
+ {
+ return fromLatin1(reinterpret_cast<const WebLChar*>(s.data()), s.length());
+ }
+
template <int N> WebString(const char (&data)[N])
{
assign(fromUTF8(data, N - 1));
« no previous file with comments | « Source/core/platform/chromium/support/WebString.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698