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