cefclient: Simplify tests and related resource loading.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1171 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-04-03 18:20:59 +00:00
parent 9643f3287e
commit 5533ceb06b
16 changed files with 334 additions and 498 deletions

View File

@ -65,24 +65,11 @@ class ClientSchemeHandler : public CefResourceHandler {
mime_type_ = "text/html";
} else if (strstr(url.c_str(), "client.png") != NULL) {
// Load the response image
#if defined(OS_WIN)
DWORD dwSize;
LPBYTE pBytes;
if (LoadBinaryResource(IDS_LOGO, dwSize, pBytes)) {
data_ = std::string(reinterpret_cast<const char*>(pBytes), dwSize);
handled = true;
// Set the resulting mime type
mime_type_ = "image/jpg";
}
#elif defined(OS_MACOSX) || defined(OS_LINUX)
if (LoadBinaryResource("logo.png", data_)) {
handled = true;
// Set the resulting mime type
mime_type_ = "image/png";
}
#else
#error "Unsupported platform"
#endif
}
if (handled) {