mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add DLL build support and wrapper that allows clients to transparently switch between static and dynamic CEF builds.
- The libcef project now builds libcef_static.lib instead of libcef.lib. - The libcef_dll project builds libcef.lib and libcef.dll. This DLL exports the new CEF C API defined in cef_capi.h, cef_nplugin_capi.h, cef_string.h and cef_string_map.h. - The libcef_dll_wrapper project builds libcef_dll_wrapper.lib. This static library wraps the new C API calls with an implementation of the CEF C++ interface as defined in cef.h and cef_nplugin.h. - The cefclient project now uses the DLL instead of the static library. - Type definitions have been moved from cef.h to cef_types.h so that they can be shared by both cef.h and cef_capi.h. This change required some enumeration member name modifications throughout the code base. - Fixed variable naming inconsistencies. - Added CefVariant::GetArraySize() method and _NPN_ArrayObjectGetVectorSize() function. - Remove the ProjectSection(WebsiteProperties) sections from cef.sln to improve VS2005 performance. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@16 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -47,10 +47,10 @@ std::wstring CefRequestImpl::GetFrame()
|
||||
return frame;
|
||||
}
|
||||
|
||||
void CefRequestImpl::SetFrame(const std::wstring& url)
|
||||
void CefRequestImpl::SetFrame(const std::wstring& frame)
|
||||
{
|
||||
Lock();
|
||||
frame_ = url;
|
||||
frame_ = frame;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ CefRefPtr<CefPostDataElement> CefPostDataElement::CreatePostDataElement()
|
||||
|
||||
CefPostDataElementImpl::CefPostDataElementImpl()
|
||||
{
|
||||
type_ = TYPE_EMPTY;
|
||||
type_ = PDE_TYPE_EMPTY;
|
||||
}
|
||||
|
||||
CefPostDataElementImpl::~CefPostDataElementImpl()
|
||||
@ -269,11 +269,11 @@ CefPostDataElementImpl::~CefPostDataElementImpl()
|
||||
void CefPostDataElementImpl::SetToEmpty()
|
||||
{
|
||||
Lock();
|
||||
if(type_ == TYPE_BYTES)
|
||||
if(type_ == PDE_TYPE_BYTES)
|
||||
free(data_.bytes.bytes);
|
||||
else if(type_ == TYPE_FILE)
|
||||
else if(type_ == PDE_TYPE_FILE)
|
||||
free(data_.filename);
|
||||
type_ = TYPE_EMPTY;
|
||||
type_ = PDE_TYPE_EMPTY;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ void CefPostDataElementImpl::SetToFile(const std::wstring& fileName)
|
||||
data[size] = 0;
|
||||
|
||||
// Assign the new data
|
||||
type_ = TYPE_FILE;
|
||||
type_ = PDE_TYPE_FILE;
|
||||
data_.filename = data;
|
||||
Unlock();
|
||||
}
|
||||
@ -314,7 +314,7 @@ void CefPostDataElementImpl::SetToBytes(size_t size, const void* bytes)
|
||||
|
||||
memcpy(data, bytes, size);
|
||||
|
||||
type_ = TYPE_BYTES;
|
||||
type_ = PDE_TYPE_BYTES;
|
||||
data_.bytes.bytes = data;
|
||||
data_.bytes.size = size;
|
||||
Unlock();
|
||||
@ -331,9 +331,9 @@ CefPostDataElement::Type CefPostDataElementImpl::GetType()
|
||||
std::wstring CefPostDataElementImpl::GetFile()
|
||||
{
|
||||
Lock();
|
||||
DCHECK(type_ == TYPE_FILE);
|
||||
DCHECK(type_ == PDE_TYPE_FILE);
|
||||
std::wstring filename;
|
||||
if(type_ == TYPE_FILE)
|
||||
if(type_ == PDE_TYPE_FILE)
|
||||
filename = data_.filename;
|
||||
Unlock();
|
||||
return filename;
|
||||
@ -342,9 +342,9 @@ std::wstring CefPostDataElementImpl::GetFile()
|
||||
size_t CefPostDataElementImpl::GetBytesCount()
|
||||
{
|
||||
Lock();
|
||||
DCHECK(type_ == TYPE_BYTES);
|
||||
DCHECK(type_ == PDE_TYPE_BYTES);
|
||||
size_t size = 0;
|
||||
if(type_ == TYPE_BYTES)
|
||||
if(type_ == PDE_TYPE_BYTES)
|
||||
size = data_.bytes.size;
|
||||
Unlock();
|
||||
return size;
|
||||
@ -353,9 +353,9 @@ size_t CefPostDataElementImpl::GetBytesCount()
|
||||
size_t CefPostDataElementImpl::GetBytes(size_t size, void *bytes)
|
||||
{
|
||||
Lock();
|
||||
DCHECK(type_ == TYPE_BYTES);
|
||||
DCHECK(type_ == PDE_TYPE_BYTES);
|
||||
size_t rv = 0;
|
||||
if(type_ == TYPE_BYTES) {
|
||||
if(type_ == PDE_TYPE_BYTES) {
|
||||
rv = (size < data_.bytes.size ? size : data_.bytes.size);
|
||||
memcpy(bytes, data_.bytes.bytes, rv);
|
||||
}
|
||||
@ -385,9 +385,9 @@ void CefPostDataElementImpl::Get(net::UploadData::Element& element)
|
||||
{
|
||||
Lock();
|
||||
|
||||
if(type_ == TYPE_BYTES) {
|
||||
if(type_ == PDE_TYPE_BYTES) {
|
||||
element.SetToBytes(static_cast<char*>(data_.bytes.bytes), data_.bytes.size);
|
||||
} else if(type_ == TYPE_FILE) {
|
||||
} else if(type_ == PDE_TYPE_FILE) {
|
||||
element.SetToFilePath(data_.filename);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
|
Reference in New Issue
Block a user