mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user