Changes to cefclient in preparation for porting.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@130 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-10-28 20:38:27 +00:00
parent fedc693be1
commit 9e3128fb42
22 changed files with 1439 additions and 1221 deletions

View File

@ -5,33 +5,6 @@
#include "string_util.h"
#include <sstream>
std::wstring StringToWString(const std::string& s)
{
wchar_t* wch;
UINT bytes = MultiByteToWideChar(CP_ACP, 0, s.c_str(), s.size()+1, NULL, 0);
wch = new wchar_t[bytes];
if(wch)
bytes = MultiByteToWideChar(CP_ACP, 0, s.c_str(), s.size()+1, wch, bytes);
std::wstring str = wch;
delete [] wch;
return str;
}
std::string WStringToString(const std::wstring& s)
{
char* ch;
UINT bytes = WideCharToMultiByte(CP_ACP, 0, s.c_str(), s.size()+1, NULL, 0,
NULL, NULL);
ch = new char[bytes];
if(ch)
bytes = WideCharToMultiByte(CP_ACP, 0, s.c_str(), s.size()+1, ch, bytes,
NULL, NULL);
std::string str = ch;
delete [] ch;
return str;
}
void DumpRequestContents(CefRefPtr<CefRequest> request, std::wstring& str)
{
std::wstringstream ss;