cefclient:

- Add Mac support for binary resource loading (issue #198).
- Simplify binary resource loading usage.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@197 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-03-04 02:14:04 +00:00
parent 377bd880b4
commit 91a46104f9
7 changed files with 217 additions and 73 deletions

View File

@ -3,6 +3,7 @@
// can be found in the LICENSE file.
#include "resource_util.h"
#include "include/cef_wrapper.h"
#ifdef _WIN32
@ -26,4 +27,17 @@ bool LoadBinaryResource(int binaryId, DWORD &dwSize, LPBYTE &pBytes)
return false;
}
CefRefPtr<CefStreamReader> GetBinaryResourceReader(int binaryId)
{
DWORD dwSize;
LPBYTE pBytes;
if(LoadBinaryResource(binaryId, dwSize, pBytes)) {
return CefStreamReader::CreateForHandler(
new CefByteReadHandler(pBytes, dwSize, NULL));
}
return NULL;
}
#endif // _WIN32