mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Auto-generate all C/C++ translation code (issue #33).
- Change index parameter types from int to size_t to make 0-based range implicit. - Make CefPrintOptions and CefMenuInfo proper wrapper classes. - Normalize the naming of menu-related types. - Remove unused command_line variable from test_suite.cc. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@408 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// A portion of this file was generated by the CEF translator tool. When
|
||||
// making changes by hand only do so within the body of existing function
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
@ -19,173 +19,281 @@
|
||||
|
||||
CEF_EXPORT cef_request_t* cef_request_create()
|
||||
{
|
||||
CefRefPtr<CefRequest> impl = CefRequest::CreateRequest();
|
||||
if(impl.get())
|
||||
return CefRequestCppToC::Wrap(impl);
|
||||
return NULL;
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefRequest> _retval = CefRequest::CreateRequest();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK request_get_url(struct _cef_request_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
CefString urlStr = CefRequestCppToC::Get(self)->GetURL();
|
||||
return urlStr.DetachToUserFree();
|
||||
// Execute
|
||||
CefString _retval = CefRequestCppToC::Get(self)->GetURL();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_url(struct _cef_request_t* self,
|
||||
const cef_string_t* url)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return;
|
||||
|
||||
CefRequestCppToC::Get(self)->SetURL(CefString(url));
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetURL(
|
||||
CefString(url));
|
||||
}
|
||||
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK request_get_method(
|
||||
struct _cef_request_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
CefString methodStr = CefRequestCppToC::Get(self)->GetMethod();
|
||||
return methodStr.DetachToUserFree();
|
||||
// Execute
|
||||
CefString _retval = CefRequestCppToC::Get(self)->GetMethod();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_method(struct _cef_request_t* self,
|
||||
const cef_string_t* method)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: method; type: string_byref_const
|
||||
DCHECK(method);
|
||||
if (!method)
|
||||
return;
|
||||
|
||||
CefRequestCppToC::Get(self)->SetMethod(CefString(method));
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetMethod(
|
||||
CefString(method));
|
||||
}
|
||||
|
||||
|
||||
struct _cef_post_data_t* CEF_CALLBACK request_get_post_data(
|
||||
struct _cef_request_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
CefRefPtr<CefPostData> postDataPtr =
|
||||
CefRequestCppToC::Get(self)->GetPostData();
|
||||
if(!postDataPtr.get())
|
||||
return NULL;
|
||||
// Execute
|
||||
CefRefPtr<CefPostData> _retval = CefRequestCppToC::Get(self)->GetPostData();
|
||||
|
||||
return CefPostDataCppToC::Wrap(postDataPtr);
|
||||
// Return type: refptr_same
|
||||
return CefPostDataCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self,
|
||||
struct _cef_post_data_t* postData)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: postData; type: refptr_same
|
||||
DCHECK(postData);
|
||||
if (!postData)
|
||||
return;
|
||||
|
||||
CefRefPtr<CefPostData> postDataPtr;
|
||||
if(postData)
|
||||
postDataPtr = CefPostDataCppToC::Unwrap(postData);
|
||||
|
||||
CefRequestCppToC::Get(self)->SetPostData(postDataPtr);
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetPostData(
|
||||
CefPostDataCppToC::Unwrap(postData));
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: headerMap; type: string_map_multi_byref
|
||||
DCHECK(headerMap);
|
||||
if (!headerMap)
|
||||
return;
|
||||
|
||||
CefRequest::HeaderMap map;
|
||||
CefRequestCppToC::Get(self)->GetHeaderMap(map);
|
||||
transfer_string_multimap_contents(map, headerMap);
|
||||
// Translate param: headerMap; type: string_map_multi_byref
|
||||
std::multimap<CefString,CefString> headerMapMultimap;
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->GetHeaderMap(
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param: headerMap; type: string_map_multi_byref
|
||||
cef_string_multimap_clear(headerMap);
|
||||
transfer_string_multimap_contents(headerMapMultimap, headerMap);
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: headerMap; type: string_map_multi_byref_const
|
||||
DCHECK(headerMap);
|
||||
if (!headerMap)
|
||||
return;
|
||||
|
||||
CefRequest::HeaderMap map;
|
||||
if(headerMap)
|
||||
transfer_string_multimap_contents(headerMap, map);
|
||||
// Translate param: headerMap; type: string_map_multi_byref_const
|
||||
std::multimap<CefString,CefString> headerMapMultimap;
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
CefRequestCppToC::Get(self)->SetHeaderMap(map);
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetHeaderMap(
|
||||
headerMapMultimap);
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set(struct _cef_request_t* self,
|
||||
const cef_string_t* url, const cef_string_t* method,
|
||||
struct _cef_post_data_t* postData, cef_string_multimap_t headerMap)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return;
|
||||
// Verify param: method; type: string_byref_const
|
||||
DCHECK(method);
|
||||
if (!method)
|
||||
return;
|
||||
// Verify param: headerMap; type: string_map_multi_byref_const
|
||||
DCHECK(headerMap);
|
||||
if (!headerMap)
|
||||
return;
|
||||
// Unverified params: postData
|
||||
|
||||
CefRefPtr<CefPostData> postDataPtr;
|
||||
CefRequest::HeaderMap map;
|
||||
// Translate param: headerMap; type: string_map_multi_byref_const
|
||||
std::multimap<CefString,CefString> headerMapMultimap;
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
if(postData)
|
||||
postDataPtr = CefPostDataCppToC::Unwrap(postData);
|
||||
if(headerMap)
|
||||
transfer_string_multimap_contents(headerMap, map);
|
||||
|
||||
CefRequestCppToC::Get(self)->Set(CefString(url), CefString(method),
|
||||
postDataPtr, map);
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->Set(
|
||||
CefString(url),
|
||||
CefString(method),
|
||||
CefPostDataCppToC::Unwrap(postData),
|
||||
headerMapMultimap);
|
||||
}
|
||||
|
||||
|
||||
enum cef_weburlrequest_flags_t CEF_CALLBACK request_get_flags(
|
||||
struct _cef_request_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return WUR_FLAG_NONE;
|
||||
|
||||
return CefRequestCppToC::Get(self)->GetFlags();
|
||||
// Execute
|
||||
cef_weburlrequest_flags_t _retval = CefRequestCppToC::Get(self)->GetFlags();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_flags(struct _cef_request_t* self,
|
||||
enum cef_weburlrequest_flags_t flags)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
CefRequestCppToC::Get(self)->SetFlags(flags);
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetFlags(
|
||||
flags);
|
||||
}
|
||||
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK request_get_first_party_for_cookies(
|
||||
struct _cef_request_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
CefString urlStr = CefRequestCppToC::Get(self)->GetFirstPartyForCookies();
|
||||
return urlStr.DetachToUserFree();
|
||||
// Execute
|
||||
CefString _retval = CefRequestCppToC::Get(self)->GetFirstPartyForCookies();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
|
||||
void CEF_CALLBACK request_set_first_party_for_cookies(
|
||||
struct _cef_request_t* self, const cef_string_t* url)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return;
|
||||
|
||||
CefRequestCppToC::Get(self)->SetFirstPartyForCookies(CefString(url));
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetFirstPartyForCookies(
|
||||
CefString(url));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefRequestCppToC::CefRequestCppToC(CefRequest* cls)
|
||||
|
Reference in New Issue
Block a user