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

Unified Diff: webkit/glue/webkit_glue.cc

Issue 5591004: glue: use string16 in place of wstring for Unicode text (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 10 years 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 | « webkit/glue/webkit_glue.h ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkit_glue.cc
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 67b61bafff610dbe4a959c7436d34b6742df25b9..350ba29fababcfc2596f0977f4b6d69cfbd2e40d 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -84,29 +84,29 @@ void EnableWebCoreNotImplementedLogging() {
WebKit::enableLogChannel("NotYetImplemented");
}
-std::wstring DumpDocumentText(WebFrame* web_frame) {
+string16 DumpDocumentText(WebFrame* web_frame) {
// We use the document element's text instead of the body text here because
// not all documents have a body, such as XML documents.
WebElement document_element = web_frame->document().documentElement();
if (document_element.isNull())
- return std::wstring();
+ return string16();
- return UTF16ToWideHack(document_element.innerText());
+ return document_element.innerText();
}
-std::wstring DumpFramesAsText(WebFrame* web_frame, bool recursive) {
- std::wstring result;
+string16 DumpFramesAsText(WebFrame* web_frame, bool recursive) {
+ string16 result;
// Add header for all but the main frame. Skip empty frames.
if (web_frame->parent() &&
!web_frame->document().documentElement().isNull()) {
- result.append(L"\n--------\nFrame: '");
- result.append(UTF16ToWideHack(web_frame->name()));
- result.append(L"'\n--------\n");
+ result.append(ASCIIToUTF16("\n--------\nFrame: '"));
+ result.append(web_frame->name());
+ result.append(ASCIIToUTF16("'\n--------\n"));
}
result.append(DumpDocumentText(web_frame));
- result.append(L"\n");
+ result.append(ASCIIToUTF16("\n"));
if (recursive) {
WebFrame* child = web_frame->firstChild();
@@ -117,8 +117,8 @@ std::wstring DumpFramesAsText(WebFrame* web_frame, bool recursive) {
return result;
}
-std::wstring DumpRenderer(WebFrame* web_frame) {
- return UTF16ToWideHack(web_frame->renderTreeAsText());
+string16 DumpRenderer(WebFrame* web_frame) {
+ return web_frame->renderTreeAsText();
}
bool CounterValueForElementById(WebFrame* web_frame, const std::string& id,
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698