mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-02 12:17:15 +01:00
Change index parameter type from int to size_t (issue #1491)
This commit is contained in:
parent
f3a0ff98bb
commit
cdd2a40469
@ -581,13 +581,13 @@ typedef struct _cef_list_value_t {
|
||||
///
|
||||
// Removes the value at the specified index.
|
||||
///
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value type at the specified index.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
|
||||
int index);
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index. For simple types the returned
|
||||
@ -597,36 +597,37 @@ typedef struct _cef_list_value_t {
|
||||
// will modify this object.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
|
||||
int index);
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index);
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type binary. The returned value
|
||||
// will reference existing data.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type dictionary. The returned
|
||||
@ -634,7 +635,7 @@ typedef struct _cef_list_value_t {
|
||||
// modify this object.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type list. The returned value
|
||||
@ -642,7 +643,7 @@ typedef struct _cef_list_value_t {
|
||||
// this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index. Returns true (1) if the value was
|
||||
@ -652,41 +653,41 @@ typedef struct _cef_list_value_t {
|
||||
// then the underlying data will be referenced and modifications to |value|
|
||||
// will modify this object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type null. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type bool. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type int. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type double. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, size_t index,
|
||||
double value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type string. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, size_t index,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
@ -696,7 +697,7 @@ typedef struct _cef_list_value_t {
|
||||
// change. Otherwise, ownership will be transferred to this object and the
|
||||
// |value| reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
@ -706,8 +707,8 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self,
|
||||
size_t index, struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type list. Returns true (1) if the
|
||||
@ -716,7 +717,7 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_list_value_t;
|
||||
|
||||
|
@ -606,14 +606,14 @@ class CefListValue : public virtual CefBase {
|
||||
///
|
||||
// Removes the value at the specified index.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool Remove(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool Remove(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value type at the specified index.
|
||||
///
|
||||
/*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/
|
||||
virtual CefValueType GetType(int index) =0;
|
||||
/*--cef(default_retval=VTYPE_INVALID)--*/
|
||||
virtual CefValueType GetType(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index. For simple types the returned
|
||||
@ -622,55 +622,55 @@ class CefListValue : public virtual CefBase {
|
||||
// returned value will reference existing data and modifications to the value
|
||||
// will modify this object.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefValue> GetValue(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefValue> GetValue(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type bool.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool GetBool(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool GetBool(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type int.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual int GetInt(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual int GetInt(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type double.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual double GetDouble(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual double GetDouble(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type string.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefString GetString(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual CefString GetString(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type binary. The returned
|
||||
// value will reference existing data.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetBinary(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetBinary(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type dictionary. The returned
|
||||
// value will reference existing data and modifications to the value will
|
||||
// modify this object.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefDictionaryValue> GetDictionary(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDictionaryValue> GetDictionary(size_t index) =0;
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type list. The returned
|
||||
// value will reference existing data and modifications to the value will
|
||||
// modify this object.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefListValue> GetList(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefListValue> GetList(size_t index) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index. Returns true if the value was set
|
||||
@ -680,43 +680,43 @@ class CefListValue : public virtual CefBase {
|
||||
// underlying data will be referenced and modifications to |value| will modify
|
||||
// this object.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetValue(int index, CefRefPtr<CefValue> value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetValue(size_t index, CefRefPtr<CefValue> value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type null. Returns true if the
|
||||
// value was set successfully.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetNull(int index) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetNull(size_t index) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type bool. Returns true if the
|
||||
// value was set successfully.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetBool(int index, bool value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetBool(size_t index, bool value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type int. Returns true if the
|
||||
// value was set successfully.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetInt(int index, int value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetInt(size_t index, int value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type double. Returns true if the
|
||||
// value was set successfully.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetDouble(int index, double value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetDouble(size_t index, double value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type string. Returns true if the
|
||||
// value was set successfully.
|
||||
///
|
||||
/*--cef(optional_param=value,index_param=index)--*/
|
||||
virtual bool SetString(int index, const CefString& value) =0;
|
||||
/*--cef(optional_param=value)--*/
|
||||
virtual bool SetString(size_t index, const CefString& value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type binary. Returns true if the
|
||||
@ -725,8 +725,8 @@ class CefListValue : public virtual CefBase {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetBinary(size_t index, CefRefPtr<CefBinaryValue> value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type dict. Returns true if the
|
||||
@ -735,8 +735,8 @@ class CefListValue : public virtual CefBase {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetDictionary(int index, CefRefPtr<CefDictionaryValue> value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetDictionary(size_t index, CefRefPtr<CefDictionaryValue> value) =0;
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type list. Returns true if the
|
||||
@ -745,8 +745,8 @@ class CefListValue : public virtual CefBase {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual bool SetList(int index, CefRefPtr<CefListValue> value) =0;
|
||||
/*--cef()--*/
|
||||
virtual bool SetList(size_t index, CefRefPtr<CefListValue> value) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_VALUES_H_
|
||||
|
@ -51,14 +51,14 @@ CEF_EXPORT cef_string_list_t cef_string_list_alloc();
|
||||
///
|
||||
// Return the number of elements in the string list.
|
||||
///
|
||||
CEF_EXPORT int cef_string_list_size(cef_string_list_t list);
|
||||
CEF_EXPORT size_t cef_string_list_size(cef_string_list_t list);
|
||||
|
||||
///
|
||||
// Retrieve the value at the specified zero-based string list index. Returns
|
||||
// true (1) if the value was successfully retrieved.
|
||||
///
|
||||
CEF_EXPORT int cef_string_list_value(cef_string_list_t list,
|
||||
int index, cef_string_t* value);
|
||||
size_t index, cef_string_t* value);
|
||||
|
||||
///
|
||||
// Append a new value at the end of the string list.
|
||||
|
@ -51,7 +51,7 @@ CEF_EXPORT cef_string_map_t cef_string_map_alloc();
|
||||
///
|
||||
// Return the number of elements in the string map.
|
||||
///
|
||||
CEF_EXPORT int cef_string_map_size(cef_string_map_t map);
|
||||
CEF_EXPORT size_t cef_string_map_size(cef_string_map_t map);
|
||||
|
||||
///
|
||||
// Return the value assigned to the specified key.
|
||||
@ -63,13 +63,13 @@ CEF_EXPORT int cef_string_map_find(cef_string_map_t map,
|
||||
///
|
||||
// Return the key at the specified zero-based string map index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map, int index,
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map, size_t index,
|
||||
cef_string_t* key);
|
||||
|
||||
///
|
||||
// Return the value at the specified zero-based string map index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map, int index,
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map, size_t index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
|
@ -52,12 +52,12 @@ CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();
|
||||
///
|
||||
// Return the number of elements in the string multimap.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map);
|
||||
CEF_EXPORT size_t cef_string_multimap_size(cef_string_multimap_t map);
|
||||
|
||||
///
|
||||
// Return the number of values with the specified key.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
CEF_EXPORT size_t cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
@ -65,19 +65,19 @@ CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
|
||||
const cef_string_t* key,
|
||||
int value_index,
|
||||
size_t value_index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
// Return the key at the specified zero-based string multimap index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index,
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, size_t index,
|
||||
cef_string_t* key);
|
||||
|
||||
///
|
||||
// Return the value at the specified zero-based string multimap index.
|
||||
///
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index,
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, size_t index,
|
||||
cef_string_t* value);
|
||||
|
||||
///
|
||||
|
@ -12,20 +12,19 @@ CEF_EXPORT cef_string_list_t cef_string_list_alloc() {
|
||||
return new StringList;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_list_size(cef_string_list_t list) {
|
||||
CEF_EXPORT size_t cef_string_list_size(cef_string_list_t list) {
|
||||
DCHECK(list);
|
||||
StringList* impl = reinterpret_cast<StringList*>(list);
|
||||
return impl->size();
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_list_value(cef_string_list_t list, int index,
|
||||
CEF_EXPORT int cef_string_list_value(cef_string_list_t list, size_t index,
|
||||
cef_string_t* value) {
|
||||
DCHECK(list);
|
||||
DCHECK(value);
|
||||
StringList* impl = reinterpret_cast<StringList*>(list);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, static_cast<int>(impl->size()));
|
||||
if (index < 0 || index >= static_cast<int>(impl->size()))
|
||||
DCHECK_LT(index, impl->size());
|
||||
if (index >= impl->size())
|
||||
return false;
|
||||
const CefString& str = (*impl)[index];
|
||||
return cef_string_copy(str.c_str(), str.length(), value);
|
||||
|
@ -12,7 +12,7 @@ CEF_EXPORT cef_string_map_t cef_string_map_alloc() {
|
||||
return new StringMap;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_map_size(cef_string_map_t map) {
|
||||
CEF_EXPORT size_t cef_string_map_size(cef_string_map_t map) {
|
||||
DCHECK(map);
|
||||
StringMap* impl = reinterpret_cast<StringMap*>(map);
|
||||
return impl->size();
|
||||
@ -32,36 +32,34 @@ CEF_EXPORT int cef_string_map_find(cef_string_map_t map,
|
||||
return cef_string_set(val.c_str(), val.length(), value, true);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map, int index,
|
||||
CEF_EXPORT int cef_string_map_key(cef_string_map_t map, size_t index,
|
||||
cef_string_t* key) {
|
||||
DCHECK(map);
|
||||
DCHECK(key);
|
||||
StringMap* impl = reinterpret_cast<StringMap*>(map);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, static_cast<int>(impl->size()));
|
||||
if (index < 0 || index >= static_cast<int>(impl->size()))
|
||||
DCHECK_LT(index, impl->size());
|
||||
if (index >= impl->size())
|
||||
return 0;
|
||||
|
||||
StringMap::const_iterator it = impl->begin();
|
||||
for (int ct = 0; it != impl->end(); ++it, ct++) {
|
||||
for (size_t ct = 0; it != impl->end(); ++it, ct++) {
|
||||
if (ct == index)
|
||||
return cef_string_set(it->first.c_str(), it->first.length(), key, true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map, int index,
|
||||
CEF_EXPORT int cef_string_map_value(cef_string_map_t map, size_t index,
|
||||
cef_string_t* value) {
|
||||
DCHECK(map);
|
||||
DCHECK(value);
|
||||
StringMap* impl = reinterpret_cast<StringMap*>(map);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, static_cast<int>(impl->size()));
|
||||
if (index < 0 || index >= static_cast<int>(impl->size()))
|
||||
DCHECK_LT(index, impl->size());
|
||||
if (index >= impl->size())
|
||||
return 0;
|
||||
|
||||
StringMap::const_iterator it = impl->begin();
|
||||
for (int ct = 0; it != impl->end(); ++it, ct++) {
|
||||
for (size_t ct = 0; it != impl->end(); ++it, ct++) {
|
||||
if (ct == index) {
|
||||
return cef_string_set(it->second.c_str(), it->second.length(), value,
|
||||
true);
|
||||
|
@ -12,13 +12,13 @@ CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc() {
|
||||
return new StringMultimap;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map) {
|
||||
CEF_EXPORT size_t cef_string_multimap_size(cef_string_multimap_t map) {
|
||||
DCHECK(map);
|
||||
StringMultimap* impl = reinterpret_cast<StringMultimap*>(map);
|
||||
return impl->size();
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
CEF_EXPORT size_t cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
const cef_string_t* key) {
|
||||
DCHECK(map);
|
||||
DCHECK(key);
|
||||
@ -28,7 +28,7 @@ CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,
|
||||
|
||||
CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
|
||||
const cef_string_t* key,
|
||||
int value_index,
|
||||
size_t value_index,
|
||||
cef_string_t* value) {
|
||||
DCHECK(map);
|
||||
DCHECK(key);
|
||||
@ -37,15 +37,14 @@ CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
|
||||
StringMultimap* impl = reinterpret_cast<StringMultimap*>(map);
|
||||
CefString key_str(key);
|
||||
|
||||
DCHECK_GE(value_index, 0);
|
||||
DCHECK_LT(value_index, static_cast<int>(impl->count(key_str)));
|
||||
if (value_index < 0 || value_index >= static_cast<int>(impl->count(key_str)))
|
||||
DCHECK_LT(value_index, impl->count(key_str));
|
||||
if (value_index >= impl->count(key_str))
|
||||
return 0;
|
||||
|
||||
std::pair<StringMultimap::iterator, StringMultimap::iterator> range_it =
|
||||
impl->equal_range(key_str);
|
||||
|
||||
int count = value_index;
|
||||
size_t count = value_index;
|
||||
while (count-- && range_it.first != range_it.second)
|
||||
range_it.first++;
|
||||
|
||||
@ -56,36 +55,34 @@ CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
|
||||
return cef_string_set(val.c_str(), val.length(), value, true);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index,
|
||||
CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, size_t index,
|
||||
cef_string_t* key) {
|
||||
DCHECK(map);
|
||||
DCHECK(key);
|
||||
StringMultimap* impl = reinterpret_cast<StringMultimap*>(map);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, static_cast<int>(impl->size()));
|
||||
if (index < 0 || index >= static_cast<int>(impl->size()))
|
||||
DCHECK_LT(index, impl->size());
|
||||
if (index >= impl->size())
|
||||
return 0;
|
||||
|
||||
StringMultimap::const_iterator it = impl->begin();
|
||||
for (int ct = 0; it != impl->end(); ++it, ct++) {
|
||||
for (size_t ct = 0; it != impl->end(); ++it, ct++) {
|
||||
if (ct == index)
|
||||
return cef_string_set(it->first.c_str(), it->first.length(), key, true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index,
|
||||
CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, size_t index,
|
||||
cef_string_t* value) {
|
||||
DCHECK(map);
|
||||
DCHECK(value);
|
||||
StringMultimap* impl = reinterpret_cast<StringMultimap*>(map);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, static_cast<int>(impl->size()));
|
||||
if (index < 0 || index >= static_cast<int>(impl->size()))
|
||||
DCHECK_LT(index, impl->size());
|
||||
if (index >= impl->size())
|
||||
return 0;
|
||||
|
||||
StringMultimap::const_iterator it = impl->begin();
|
||||
for (int ct = 0; it != impl->end(); ++it, ct++) {
|
||||
for (size_t ct = 0; it != impl->end(); ++it, ct++) {
|
||||
if (ct == index) {
|
||||
return cef_string_set(it->second.c_str(), it->second.length(), value,
|
||||
true);
|
||||
|
@ -1130,12 +1130,12 @@ bool CefListValueImpl::Clear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::Remove(int index) {
|
||||
bool CefListValueImpl::Remove(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
return RemoveInternal(index);
|
||||
}
|
||||
|
||||
CefValueType CefListValueImpl::GetType(int index) {
|
||||
CefValueType CefListValueImpl::GetType(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1163,7 +1163,7 @@ CefValueType CefListValueImpl::GetType(int index) {
|
||||
return VTYPE_INVALID;
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefListValueImpl::GetValue(int index) {
|
||||
CefRefPtr<CefValue> CefListValueImpl::GetValue(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1178,7 +1178,7 @@ CefRefPtr<CefValue> CefListValueImpl::GetValue(int index) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::GetBool(int index) {
|
||||
bool CefListValueImpl::GetBool(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1190,7 +1190,7 @@ bool CefListValueImpl::GetBool(int index) {
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
int CefListValueImpl::GetInt(int index) {
|
||||
int CefListValueImpl::GetInt(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1202,7 +1202,7 @@ int CefListValueImpl::GetInt(int index) {
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
double CefListValueImpl::GetDouble(int index) {
|
||||
double CefListValueImpl::GetDouble(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1214,7 +1214,7 @@ double CefListValueImpl::GetDouble(int index) {
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
CefString CefListValueImpl::GetString(int index) {
|
||||
CefString CefListValueImpl::GetString(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1226,7 +1226,7 @@ CefString CefListValueImpl::GetString(int index) {
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefListValueImpl::GetBinary(int index) {
|
||||
CefRefPtr<CefBinaryValue> CefListValueImpl::GetBinary(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1242,7 +1242,7 @@ CefRefPtr<CefBinaryValue> CefListValueImpl::GetBinary(int index) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefListValueImpl::GetDictionary(int index) {
|
||||
CefRefPtr<CefDictionaryValue> CefListValueImpl::GetDictionary(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1262,7 +1262,7 @@ CefRefPtr<CefDictionaryValue> CefListValueImpl::GetDictionary(int index) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueImpl::GetList(int index) {
|
||||
CefRefPtr<CefListValue> CefListValueImpl::GetList(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
@ -1281,7 +1281,7 @@ CefRefPtr<CefListValue> CefListValueImpl::GetList(int index) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetValue(int index, CefRefPtr<CefValue> value) {
|
||||
bool CefListValueImpl::SetValue(size_t index, CefRefPtr<CefValue> value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
|
||||
CefValueImpl* impl = static_cast<CefValueImpl*>(value.get());
|
||||
@ -1293,37 +1293,37 @@ bool CefListValueImpl::SetValue(int index, CefRefPtr<CefValue> value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetNull(int index) {
|
||||
bool CefListValueImpl::SetNull(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
SetInternal(index, base::Value::CreateNullValue().release());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetBool(int index, bool value) {
|
||||
bool CefListValueImpl::SetBool(size_t index, bool value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
SetInternal(index, new base::FundamentalValue(value));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetInt(int index, int value) {
|
||||
bool CefListValueImpl::SetInt(size_t index, int value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
SetInternal(index, new base::FundamentalValue(value));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetDouble(int index, double value) {
|
||||
bool CefListValueImpl::SetDouble(size_t index, double value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
SetInternal(index, new base::FundamentalValue(value));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetString(int index, const CefString& value) {
|
||||
bool CefListValueImpl::SetString(size_t index, const CefString& value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
SetInternal(index, new base::StringValue(value.ToString()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
||||
bool CefListValueImpl::SetBinary(size_t index, CefRefPtr<CefBinaryValue> value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
|
||||
CefBinaryValueImpl* impl = static_cast<CefBinaryValueImpl*>(value.get());
|
||||
@ -1333,7 +1333,7 @@ bool CefListValueImpl::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetDictionary(int index,
|
||||
bool CefListValueImpl::SetDictionary(size_t index,
|
||||
CefRefPtr<CefDictionaryValue> value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
|
||||
@ -1345,7 +1345,7 @@ bool CefListValueImpl::SetDictionary(int index,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetList(int index, CefRefPtr<CefListValue> value) {
|
||||
bool CefListValueImpl::SetList(size_t index, CefRefPtr<CefListValue> value) {
|
||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||
|
||||
CefListValueImpl* impl = static_cast<CefListValueImpl*>(value.get());
|
||||
@ -1355,7 +1355,7 @@ bool CefListValueImpl::SetList(int index, CefRefPtr<CefListValue> value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::RemoveInternal(int index) {
|
||||
bool CefListValueImpl::RemoveInternal(size_t index) {
|
||||
std::unique_ptr<base::Value> out_value;
|
||||
if (!mutable_value()->Remove(index, &out_value))
|
||||
return false;
|
||||
@ -1372,7 +1372,7 @@ bool CefListValueImpl::RemoveInternal(int index) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefListValueImpl::SetInternal(int index, base::Value* value) {
|
||||
void CefListValueImpl::SetInternal(size_t index, base::Value* value) {
|
||||
DCHECK(value);
|
||||
if (RemoveInternal(index))
|
||||
mutable_value()->Insert(index, base::WrapUnique(value));
|
||||
|
@ -318,26 +318,26 @@ class CefListValueImpl
|
||||
bool SetSize(size_t size) override;
|
||||
size_t GetSize() override;
|
||||
bool Clear() override;
|
||||
bool Remove(int index) override;
|
||||
CefValueType GetType(int index) override;
|
||||
CefRefPtr<CefValue> GetValue(int index) override;
|
||||
bool GetBool(int index) override;
|
||||
int GetInt(int index) override;
|
||||
double GetDouble(int index) override;
|
||||
CefString GetString(int index) override;
|
||||
CefRefPtr<CefBinaryValue> GetBinary(int index) override;
|
||||
CefRefPtr<CefDictionaryValue> GetDictionary(int index) override;
|
||||
CefRefPtr<CefListValue> GetList(int index) override;
|
||||
bool SetValue(int index, CefRefPtr<CefValue> value) override;
|
||||
bool SetNull(int index) override;
|
||||
bool SetBool(int index, bool value) override;
|
||||
bool SetInt(int index, int value) override;
|
||||
bool SetDouble(int index, double value) override;
|
||||
bool SetString(int index, const CefString& value) override;
|
||||
bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) override;
|
||||
bool SetDictionary(int index,
|
||||
bool Remove(size_t index) override;
|
||||
CefValueType GetType(size_t index) override;
|
||||
CefRefPtr<CefValue> GetValue(size_t index) override;
|
||||
bool GetBool(size_t index) override;
|
||||
int GetInt(size_t index) override;
|
||||
double GetDouble(size_t index) override;
|
||||
CefString GetString(size_t index) override;
|
||||
CefRefPtr<CefBinaryValue> GetBinary(size_t index) override;
|
||||
CefRefPtr<CefDictionaryValue> GetDictionary(size_t index) override;
|
||||
CefRefPtr<CefListValue> GetList(size_t index) override;
|
||||
bool SetValue(size_t index, CefRefPtr<CefValue> value) override;
|
||||
bool SetNull(size_t index) override;
|
||||
bool SetBool(size_t index, bool value) override;
|
||||
bool SetInt(size_t index, int value) override;
|
||||
bool SetDouble(size_t index, double value) override;
|
||||
bool SetString(size_t index, const CefString& value) override;
|
||||
bool SetBinary(size_t index, CefRefPtr<CefBinaryValue> value) override;
|
||||
bool SetDictionary(size_t index,
|
||||
CefRefPtr<CefDictionaryValue> value) override;
|
||||
bool SetList(int index, CefRefPtr<CefListValue> value) override;
|
||||
bool SetList(size_t index, CefRefPtr<CefListValue> value) override;
|
||||
|
||||
private:
|
||||
// See the CefValueBase constructor for usage.
|
||||
@ -347,8 +347,8 @@ class CefListValueImpl
|
||||
bool read_only,
|
||||
CefValueController* controller);
|
||||
|
||||
bool RemoveInternal(int index);
|
||||
void SetInternal(int index, base::Value* value);
|
||||
bool RemoveInternal(size_t index);
|
||||
void SetInternal(size_t index, base::Value* value);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefListValueImpl);
|
||||
};
|
||||
|
@ -174,16 +174,13 @@ int CEF_CALLBACK list_value_clear(struct _cef_list_value_t* self) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_remove(struct _cef_list_value_t* self, int index) {
|
||||
int CEF_CALLBACK list_value_remove(struct _cef_list_value_t* self,
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->Remove(
|
||||
@ -194,16 +191,12 @@ int CEF_CALLBACK list_value_remove(struct _cef_list_value_t* self, int index) {
|
||||
}
|
||||
|
||||
cef_value_type_t CEF_CALLBACK list_value_get_type(
|
||||
struct _cef_list_value_t* self, int index) {
|
||||
struct _cef_list_value_t* self, size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return VTYPE_INVALID;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// Execute
|
||||
cef_value_type_t _retval = CefListValueCppToC::Get(self)->GetType(
|
||||
@ -214,16 +207,12 @@ cef_value_type_t CEF_CALLBACK list_value_get_type(
|
||||
}
|
||||
|
||||
cef_value_t* CEF_CALLBACK list_value_get_value(struct _cef_list_value_t* self,
|
||||
int index) {
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefValue> _retval = CefListValueCppToC::Get(self)->GetValue(
|
||||
@ -234,16 +223,12 @@ cef_value_t* CEF_CALLBACK list_value_get_value(struct _cef_list_value_t* self,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_get_bool(struct _cef_list_value_t* self,
|
||||
int index) {
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->GetBool(
|
||||
@ -253,16 +238,13 @@ int CEF_CALLBACK list_value_get_bool(struct _cef_list_value_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_get_int(struct _cef_list_value_t* self, int index) {
|
||||
int CEF_CALLBACK list_value_get_int(struct _cef_list_value_t* self,
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefListValueCppToC::Get(self)->GetInt(
|
||||
@ -273,16 +255,12 @@ int CEF_CALLBACK list_value_get_int(struct _cef_list_value_t* self, int index) {
|
||||
}
|
||||
|
||||
double CEF_CALLBACK list_value_get_double(struct _cef_list_value_t* self,
|
||||
int index) {
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
double _retval = CefListValueCppToC::Get(self)->GetDouble(
|
||||
@ -293,16 +271,12 @@ double CEF_CALLBACK list_value_get_double(struct _cef_list_value_t* self,
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK list_value_get_string(
|
||||
struct _cef_list_value_t* self, int index) {
|
||||
struct _cef_list_value_t* self, size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefListValueCppToC::Get(self)->GetString(
|
||||
@ -313,16 +287,12 @@ cef_string_userfree_t CEF_CALLBACK list_value_get_string(
|
||||
}
|
||||
|
||||
cef_binary_value_t* CEF_CALLBACK list_value_get_binary(
|
||||
struct _cef_list_value_t* self, int index) {
|
||||
struct _cef_list_value_t* self, size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBinaryValue> _retval = CefListValueCppToC::Get(self)->GetBinary(
|
||||
@ -333,16 +303,12 @@ cef_binary_value_t* CEF_CALLBACK list_value_get_binary(
|
||||
}
|
||||
|
||||
cef_dictionary_value_t* CEF_CALLBACK list_value_get_dictionary(
|
||||
struct _cef_list_value_t* self, int index) {
|
||||
struct _cef_list_value_t* self, size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDictionaryValue> _retval = CefListValueCppToC::Get(
|
||||
@ -354,16 +320,12 @@ cef_dictionary_value_t* CEF_CALLBACK list_value_get_dictionary(
|
||||
}
|
||||
|
||||
struct _cef_list_value_t* CEF_CALLBACK list_value_get_list(
|
||||
struct _cef_list_value_t* self, int index) {
|
||||
struct _cef_list_value_t* self, size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefListValue> _retval = CefListValueCppToC::Get(self)->GetList(
|
||||
@ -373,17 +335,13 @@ struct _cef_list_value_t* CEF_CALLBACK list_value_get_list(
|
||||
return CefListValueCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_value(struct _cef_list_value_t* self, int index,
|
||||
cef_value_t* value) {
|
||||
int CEF_CALLBACK list_value_set_value(struct _cef_list_value_t* self,
|
||||
size_t index, cef_value_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
@ -399,16 +357,12 @@ int CEF_CALLBACK list_value_set_value(struct _cef_list_value_t* self, int index,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_null(struct _cef_list_value_t* self,
|
||||
int index) {
|
||||
size_t index) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->SetNull(
|
||||
@ -418,17 +372,13 @@ int CEF_CALLBACK list_value_set_null(struct _cef_list_value_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_bool(struct _cef_list_value_t* self, int index,
|
||||
int value) {
|
||||
int CEF_CALLBACK list_value_set_bool(struct _cef_list_value_t* self,
|
||||
size_t index, int value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->SetBool(
|
||||
@ -439,17 +389,13 @@ int CEF_CALLBACK list_value_set_bool(struct _cef_list_value_t* self, int index,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_int(struct _cef_list_value_t* self, int index,
|
||||
int value) {
|
||||
int CEF_CALLBACK list_value_set_int(struct _cef_list_value_t* self,
|
||||
size_t index, int value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->SetInt(
|
||||
@ -461,16 +407,12 @@ int CEF_CALLBACK list_value_set_int(struct _cef_list_value_t* self, int index,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_double(struct _cef_list_value_t* self,
|
||||
int index, double value) {
|
||||
size_t index, double value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefListValueCppToC::Get(self)->SetDouble(
|
||||
@ -482,16 +424,12 @@ int CEF_CALLBACK list_value_set_double(struct _cef_list_value_t* self,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_string(struct _cef_list_value_t* self,
|
||||
int index, const cef_string_t* value) {
|
||||
size_t index, const cef_string_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
@ -504,16 +442,12 @@ int CEF_CALLBACK list_value_set_string(struct _cef_list_value_t* self,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_binary(struct _cef_list_value_t* self,
|
||||
int index, cef_binary_value_t* value) {
|
||||
size_t index, cef_binary_value_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
@ -529,16 +463,12 @@ int CEF_CALLBACK list_value_set_binary(struct _cef_list_value_t* self,
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_dictionary(struct _cef_list_value_t* self,
|
||||
int index, cef_dictionary_value_t* value) {
|
||||
size_t index, cef_dictionary_value_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
@ -553,17 +483,13 @@ int CEF_CALLBACK list_value_set_dictionary(struct _cef_list_value_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK list_value_set_list(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_list_value_t* value) {
|
||||
int CEF_CALLBACK list_value_set_list(struct _cef_list_value_t* self,
|
||||
size_t index, struct _cef_list_value_t* value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value);
|
||||
if (!value)
|
||||
|
@ -170,18 +170,13 @@ bool CefListValueCToCpp::Clear() {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::Remove(int index) {
|
||||
bool CefListValueCToCpp::Remove(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, remove))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->remove(_struct,
|
||||
index);
|
||||
@ -190,18 +185,13 @@ bool CefListValueCToCpp::Remove(int index) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefValueType CefListValueCToCpp::GetType(int index) {
|
||||
CefValueType CefListValueCToCpp::GetType(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_type))
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// Execute
|
||||
cef_value_type_t _retval = _struct->get_type(_struct,
|
||||
index);
|
||||
@ -210,18 +200,13 @@ CefValueType CefListValueCToCpp::GetType(int index) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefListValueCToCpp::GetValue(int index) {
|
||||
CefRefPtr<CefValue> CefListValueCToCpp::GetValue(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_value))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_value_t* _retval = _struct->get_value(_struct,
|
||||
index);
|
||||
@ -230,18 +215,13 @@ CefRefPtr<CefValue> CefListValueCToCpp::GetValue(int index) {
|
||||
return CefValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::GetBool(int index) {
|
||||
bool CefListValueCToCpp::GetBool(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_bool(_struct,
|
||||
index);
|
||||
@ -250,18 +230,13 @@ bool CefListValueCToCpp::GetBool(int index) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
int CefListValueCToCpp::GetInt(int index) {
|
||||
int CefListValueCToCpp::GetInt(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_int))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_int(_struct,
|
||||
index);
|
||||
@ -270,18 +245,13 @@ int CefListValueCToCpp::GetInt(int index) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
double CefListValueCToCpp::GetDouble(int index) {
|
||||
double CefListValueCToCpp::GetDouble(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_double))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
double _retval = _struct->get_double(_struct,
|
||||
index);
|
||||
@ -290,18 +260,13 @@ double CefListValueCToCpp::GetDouble(int index) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefListValueCToCpp::GetString(int index) {
|
||||
CefString CefListValueCToCpp::GetString(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_string))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = _struct->get_string(_struct,
|
||||
index);
|
||||
@ -312,18 +277,13 @@ CefString CefListValueCToCpp::GetString(int index) {
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefListValueCToCpp::GetBinary(int index) {
|
||||
CefRefPtr<CefBinaryValue> CefListValueCToCpp::GetBinary(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_binary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = _struct->get_binary(_struct,
|
||||
index);
|
||||
@ -332,18 +292,13 @@ CefRefPtr<CefBinaryValue> CefListValueCToCpp::GetBinary(int index) {
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefListValueCToCpp::GetDictionary(int index) {
|
||||
CefRefPtr<CefDictionaryValue> CefListValueCToCpp::GetDictionary(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_dictionary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = _struct->get_dictionary(_struct,
|
||||
index);
|
||||
@ -352,18 +307,13 @@ CefRefPtr<CefDictionaryValue> CefListValueCToCpp::GetDictionary(int index) {
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueCToCpp::GetList(int index) {
|
||||
CefRefPtr<CefListValue> CefListValueCToCpp::GetList(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_list))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = _struct->get_list(_struct,
|
||||
index);
|
||||
@ -372,17 +322,13 @@ CefRefPtr<CefListValue> CefListValueCToCpp::GetList(int index) {
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetValue(int index, CefRefPtr<CefValue> value) {
|
||||
bool CefListValueCToCpp::SetValue(size_t index, CefRefPtr<CefValue> value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_value))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
@ -397,18 +343,13 @@ bool CefListValueCToCpp::SetValue(int index, CefRefPtr<CefValue> value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetNull(int index) {
|
||||
bool CefListValueCToCpp::SetNull(size_t index) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_null))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->set_null(_struct,
|
||||
index);
|
||||
@ -417,18 +358,13 @@ bool CefListValueCToCpp::SetNull(int index) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetBool(int index, bool value) {
|
||||
bool CefListValueCToCpp::SetBool(size_t index, bool value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->set_bool(_struct,
|
||||
index,
|
||||
@ -438,18 +374,13 @@ bool CefListValueCToCpp::SetBool(int index, bool value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetInt(int index, int value) {
|
||||
bool CefListValueCToCpp::SetInt(size_t index, int value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_int))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->set_int(_struct,
|
||||
index,
|
||||
@ -459,18 +390,13 @@ bool CefListValueCToCpp::SetInt(int index, int value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetDouble(int index, double value) {
|
||||
bool CefListValueCToCpp::SetDouble(size_t index, double value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_double))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->set_double(_struct,
|
||||
index,
|
||||
@ -480,17 +406,13 @@ bool CefListValueCToCpp::SetDouble(int index, double value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetString(int index, const CefString& value) {
|
||||
bool CefListValueCToCpp::SetString(size_t index, const CefString& value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_string))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
@ -502,17 +424,14 @@ bool CefListValueCToCpp::SetString(int index, const CefString& value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
||||
bool CefListValueCToCpp::SetBinary(size_t index,
|
||||
CefRefPtr<CefBinaryValue> value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_binary))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
@ -527,7 +446,7 @@ bool CefListValueCToCpp::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetDictionary(int index,
|
||||
bool CefListValueCToCpp::SetDictionary(size_t index,
|
||||
CefRefPtr<CefDictionaryValue> value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_dictionary))
|
||||
@ -535,10 +454,6 @@ bool CefListValueCToCpp::SetDictionary(int index,
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
@ -553,17 +468,13 @@ bool CefListValueCToCpp::SetDictionary(int index,
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetList(int index, CefRefPtr<CefListValue> value) {
|
||||
bool CefListValueCToCpp::SetList(size_t index, CefRefPtr<CefListValue> value) {
|
||||
cef_list_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_list))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
|
@ -39,25 +39,26 @@ class CefListValueCToCpp
|
||||
bool SetSize(size_t size) OVERRIDE;
|
||||
size_t GetSize() OVERRIDE;
|
||||
bool Clear() OVERRIDE;
|
||||
bool Remove(int index) OVERRIDE;
|
||||
CefValueType GetType(int index) OVERRIDE;
|
||||
CefRefPtr<CefValue> GetValue(int index) OVERRIDE;
|
||||
bool GetBool(int index) OVERRIDE;
|
||||
int GetInt(int index) OVERRIDE;
|
||||
double GetDouble(int index) OVERRIDE;
|
||||
CefString GetString(int index) OVERRIDE;
|
||||
CefRefPtr<CefBinaryValue> GetBinary(int index) OVERRIDE;
|
||||
CefRefPtr<CefDictionaryValue> GetDictionary(int index) OVERRIDE;
|
||||
CefRefPtr<CefListValue> GetList(int index) OVERRIDE;
|
||||
bool SetValue(int index, CefRefPtr<CefValue> value) OVERRIDE;
|
||||
bool SetNull(int index) OVERRIDE;
|
||||
bool SetBool(int index, bool value) OVERRIDE;
|
||||
bool SetInt(int index, int value) OVERRIDE;
|
||||
bool SetDouble(int index, double value) OVERRIDE;
|
||||
bool SetString(int index, const CefString& value) OVERRIDE;
|
||||
bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) OVERRIDE;
|
||||
bool SetDictionary(int index, CefRefPtr<CefDictionaryValue> value) OVERRIDE;
|
||||
bool SetList(int index, CefRefPtr<CefListValue> value) OVERRIDE;
|
||||
bool Remove(size_t index) OVERRIDE;
|
||||
CefValueType GetType(size_t index) OVERRIDE;
|
||||
CefRefPtr<CefValue> GetValue(size_t index) OVERRIDE;
|
||||
bool GetBool(size_t index) OVERRIDE;
|
||||
int GetInt(size_t index) OVERRIDE;
|
||||
double GetDouble(size_t index) OVERRIDE;
|
||||
CefString GetString(size_t index) OVERRIDE;
|
||||
CefRefPtr<CefBinaryValue> GetBinary(size_t index) OVERRIDE;
|
||||
CefRefPtr<CefDictionaryValue> GetDictionary(size_t index) OVERRIDE;
|
||||
CefRefPtr<CefListValue> GetList(size_t index) OVERRIDE;
|
||||
bool SetValue(size_t index, CefRefPtr<CefValue> value) OVERRIDE;
|
||||
bool SetNull(size_t index) OVERRIDE;
|
||||
bool SetBool(size_t index, bool value) OVERRIDE;
|
||||
bool SetInt(size_t index, int value) OVERRIDE;
|
||||
bool SetDouble(size_t index, double value) OVERRIDE;
|
||||
bool SetString(size_t index, const CefString& value) OVERRIDE;
|
||||
bool SetBinary(size_t index, CefRefPtr<CefBinaryValue> value) OVERRIDE;
|
||||
bool SetDictionary(size_t index,
|
||||
CefRefPtr<CefDictionaryValue> value) OVERRIDE;
|
||||
bool SetList(size_t index, CefRefPtr<CefListValue> value) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
|
@ -7,10 +7,10 @@
|
||||
void transfer_string_list_contents(cef_string_list_t fromList,
|
||||
StringList& toList)
|
||||
{
|
||||
int size = cef_string_list_size(fromList);
|
||||
size_t size = cef_string_list_size(fromList);
|
||||
CefString value;
|
||||
|
||||
for(int i = 0; i < size; i++) {
|
||||
for(size_t i = 0; i < size; i++) {
|
||||
cef_string_list_value(fromList, i, value.GetWritableStruct());
|
||||
toList.push_back(value);
|
||||
}
|
||||
@ -27,10 +27,10 @@ void transfer_string_list_contents(const StringList& fromList,
|
||||
void transfer_string_map_contents(cef_string_map_t fromMap,
|
||||
StringMap& toMap)
|
||||
{
|
||||
int size = cef_string_map_size(fromMap);
|
||||
size_t size = cef_string_map_size(fromMap);
|
||||
CefString key, value;
|
||||
|
||||
for(int i = 0; i < size; ++i) {
|
||||
for(size_t i = 0; i < size; ++i) {
|
||||
cef_string_map_key(fromMap, i, key.GetWritableStruct());
|
||||
cef_string_map_value(fromMap, i, value.GetWritableStruct());
|
||||
|
||||
@ -49,10 +49,10 @@ void transfer_string_map_contents(const StringMap& fromMap,
|
||||
void transfer_string_multimap_contents(cef_string_multimap_t fromMap,
|
||||
StringMultimap& toMap)
|
||||
{
|
||||
int size = cef_string_multimap_size(fromMap);
|
||||
size_t size = cef_string_multimap_size(fromMap);
|
||||
CefString key, value;
|
||||
|
||||
for(int i = 0; i < size; ++i) {
|
||||
for(size_t i = 0; i < size; ++i) {
|
||||
cef_string_multimap_key(fromMap, i, key.GetWritableStruct());
|
||||
cef_string_multimap_value(fromMap, i, value.GetWritableStruct());
|
||||
|
||||
|
@ -309,7 +309,7 @@ TEST(ParserTest, ParseJSONNull) {
|
||||
CefRefPtr<CefDictionaryValue> dict = value->GetDictionary();
|
||||
CefDictionaryValue::KeyList key_list;
|
||||
EXPECT_TRUE(dict->GetKeys(key_list));
|
||||
EXPECT_EQ((size_t)1, key_list.size());
|
||||
EXPECT_EQ(1U, key_list.size());
|
||||
EXPECT_EQ("key1", key_list[0].ToString());
|
||||
EXPECT_EQ(VTYPE_NULL, dict->GetType("key1"));
|
||||
|
||||
@ -342,7 +342,7 @@ TEST(ParserTest, ParseJSONDictionary) {
|
||||
CefRefPtr<CefDictionaryValue> dict = value->GetDictionary();
|
||||
CefDictionaryValue::KeyList key_list;
|
||||
EXPECT_TRUE(dict->GetKeys(key_list));
|
||||
EXPECT_EQ((size_t)3, key_list.size());
|
||||
EXPECT_EQ(3U, key_list.size());
|
||||
EXPECT_EQ("key1", key_list[0].ToString());
|
||||
EXPECT_EQ("key2", key_list[1].ToString());
|
||||
EXPECT_EQ("key3", key_list[2].ToString());
|
||||
@ -354,7 +354,7 @@ TEST(ParserTest, ParseJSONDictionary) {
|
||||
CefRefPtr<CefListValue> key3 = dict->GetList("key3");
|
||||
EXPECT_TRUE(NULL != key3);
|
||||
EXPECT_TRUE(key3->IsValid());
|
||||
EXPECT_EQ((size_t)3, key3->GetSize());
|
||||
EXPECT_EQ(3U, key3->GetSize());
|
||||
EXPECT_EQ(1, key3->GetInt(0));
|
||||
EXPECT_EQ(2, key3->GetInt(1));
|
||||
EXPECT_EQ(3, key3->GetInt(2));
|
||||
@ -375,7 +375,7 @@ TEST(ParserTest, ParseJSONList) {
|
||||
CefRefPtr<CefListValue> list = value->GetList();
|
||||
EXPECT_TRUE(NULL != list);
|
||||
EXPECT_TRUE(list->IsValid());
|
||||
EXPECT_EQ((size_t)3, list->GetSize());
|
||||
EXPECT_EQ(3U, list->GetSize());
|
||||
|
||||
EXPECT_EQ(VTYPE_STRING, list->GetType(0));
|
||||
EXPECT_EQ(list->GetString(0), "value1");
|
||||
@ -385,9 +385,9 @@ TEST(ParserTest, ParseJSONList) {
|
||||
CefRefPtr<CefDictionaryValue> dict = list->GetDictionary(2);
|
||||
CefDictionaryValue::KeyList key_list2;
|
||||
EXPECT_TRUE(dict->GetKeys(key_list2));
|
||||
EXPECT_EQ((size_t)1, key_list2.size());
|
||||
EXPECT_EQ(1U, key_list2.size());
|
||||
CefRefPtr<CefListValue> list2 = dict->GetList("key3");
|
||||
EXPECT_EQ((size_t)3, list2->GetSize());
|
||||
EXPECT_EQ(3U, list2->GetSize());
|
||||
EXPECT_EQ(1, list2->GetInt(0));
|
||||
EXPECT_EQ(2, list2->GetInt(1));
|
||||
EXPECT_EQ(3, list2->GetInt(2));
|
||||
|
@ -25,7 +25,7 @@ CefRefPtr<CefProcessMessage> CreateTestMessage() {
|
||||
CefRefPtr<CefListValue> args = msg->GetArgumentList();
|
||||
EXPECT_TRUE(args.get());
|
||||
|
||||
int index = 0;
|
||||
size_t index = 0;
|
||||
args->SetNull(index++);
|
||||
args->SetInt(index++, 5);
|
||||
args->SetDouble(index++, 10.543);
|
||||
@ -33,7 +33,7 @@ CefRefPtr<CefProcessMessage> CreateTestMessage() {
|
||||
args->SetString(index++, "test string");
|
||||
args->SetList(index++, args->Copy());
|
||||
|
||||
EXPECT_EQ((size_t)index, args->GetSize());
|
||||
EXPECT_EQ(index, args->GetSize());
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
@ -170,32 +170,32 @@ TEST(StringTest, List) {
|
||||
CefString str;
|
||||
int ret;
|
||||
|
||||
EXPECT_EQ(cef_string_list_size(listPtr), 3);
|
||||
EXPECT_EQ(cef_string_list_size(listPtr), 3U);
|
||||
|
||||
ret = cef_string_list_value(listPtr, 0, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 1");
|
||||
ret = cef_string_list_value(listPtr, 1, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 2");
|
||||
ret = cef_string_list_value(listPtr, 2, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 3");
|
||||
|
||||
cef_string_list_t listPtr2 = cef_string_list_copy(listPtr);
|
||||
cef_string_list_clear(listPtr);
|
||||
EXPECT_EQ(cef_string_list_size(listPtr), 0);
|
||||
EXPECT_EQ(cef_string_list_size(listPtr), 0U);
|
||||
cef_string_list_free(listPtr);
|
||||
|
||||
EXPECT_EQ(cef_string_list_size(listPtr2), 3);
|
||||
EXPECT_EQ(cef_string_list_size(listPtr2), 3U);
|
||||
|
||||
ret = cef_string_list_value(listPtr2, 0, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr2, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 1");
|
||||
ret = cef_string_list_value(listPtr2, 1, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr2, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 2");
|
||||
ret = cef_string_list_value(listPtr2, 2, str.GetWritableStruct());
|
||||
ret = cef_string_list_value(listPtr2, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 3");
|
||||
|
||||
@ -237,26 +237,26 @@ TEST(StringTest, Map) {
|
||||
CefString str;
|
||||
int ret;
|
||||
|
||||
EXPECT_EQ(cef_string_map_size(mapPtr), 3);
|
||||
EXPECT_EQ(cef_string_map_size(mapPtr), 3U);
|
||||
|
||||
ret = cef_string_map_key(mapPtr, 0, str.GetWritableStruct());
|
||||
ret = cef_string_map_key(mapPtr, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 1");
|
||||
ret = cef_string_map_value(mapPtr, 0, str.GetWritableStruct());
|
||||
ret = cef_string_map_value(mapPtr, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 1");
|
||||
|
||||
ret = cef_string_map_key(mapPtr, 1, str.GetWritableStruct());
|
||||
ret = cef_string_map_key(mapPtr, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 2");
|
||||
ret = cef_string_map_value(mapPtr, 1, str.GetWritableStruct());
|
||||
ret = cef_string_map_value(mapPtr, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 2");
|
||||
|
||||
ret = cef_string_map_key(mapPtr, 2, str.GetWritableStruct());
|
||||
ret = cef_string_map_key(mapPtr, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 3");
|
||||
ret = cef_string_map_value(mapPtr, 2, str.GetWritableStruct());
|
||||
ret = cef_string_map_value(mapPtr, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 3");
|
||||
|
||||
@ -267,7 +267,7 @@ TEST(StringTest, Map) {
|
||||
EXPECT_EQ(str, "String 2");
|
||||
|
||||
cef_string_map_clear(mapPtr);
|
||||
EXPECT_EQ(cef_string_map_size(mapPtr), 0);
|
||||
EXPECT_EQ(cef_string_map_size(mapPtr), 0U);
|
||||
|
||||
cef_string_map_free(mapPtr);
|
||||
}
|
||||
@ -295,9 +295,9 @@ TEST(StringTest, Multimap) {
|
||||
// Either of "String 2" or "String 2.1" is fine since
|
||||
// std::multimap provides no guarantee wrt the order of
|
||||
// values with the same key.
|
||||
EXPECT_EQ(same_key_it->second.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ((++same_key_it)->second.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ(map.count("Key 2"), (size_t)2);
|
||||
EXPECT_EQ(same_key_it->second.ToString().find("String 2"), 0U);
|
||||
EXPECT_EQ((++same_key_it)->second.ToString().find("String 2"), 0U);
|
||||
EXPECT_EQ(map.count("Key 2"), 2U);
|
||||
|
||||
EXPECT_EQ(map.find("Key 1")->second, "String 1");
|
||||
EXPECT_EQ(map.find("Key 3")->second, "String 3");
|
||||
@ -313,53 +313,53 @@ TEST(StringTest, Multimap) {
|
||||
CefString str;
|
||||
int ret;
|
||||
|
||||
EXPECT_EQ(cef_string_multimap_size(mapPtr), 4);
|
||||
EXPECT_EQ(cef_string_multimap_size(mapPtr), 4U);
|
||||
|
||||
ret = cef_string_multimap_key(mapPtr, 0, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_key(mapPtr, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 1");
|
||||
ret = cef_string_multimap_value(mapPtr, 0, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_value(mapPtr, 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 1");
|
||||
|
||||
ret = cef_string_multimap_key(mapPtr, 1, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_key(mapPtr, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 2");
|
||||
ret = cef_string_multimap_value(mapPtr, 1, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_value(mapPtr, 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), 0U);
|
||||
|
||||
ret = cef_string_multimap_key(mapPtr, 2, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_key(mapPtr, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 2");
|
||||
ret = cef_string_multimap_value(mapPtr, 2, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_value(mapPtr, 2U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), 0U);
|
||||
|
||||
ret = cef_string_multimap_key(mapPtr, 3, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_key(mapPtr, 3U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "Key 3");
|
||||
ret = cef_string_multimap_value(mapPtr, 3, str.GetWritableStruct());
|
||||
ret = cef_string_multimap_value(mapPtr, 3U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str, "String 3");
|
||||
|
||||
CefString key;
|
||||
key.FromASCII("Key 2");
|
||||
ret = cef_string_multimap_find_count(mapPtr, key.GetStruct());
|
||||
EXPECT_EQ(ret, 2);
|
||||
size_t size = cef_string_multimap_find_count(mapPtr, key.GetStruct());
|
||||
EXPECT_EQ(size, 2U);
|
||||
|
||||
ret = cef_string_multimap_enumerate(mapPtr,
|
||||
key.GetStruct(), 0, str.GetWritableStruct());
|
||||
key.GetStruct(), 0U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), 0U);
|
||||
|
||||
ret = cef_string_multimap_enumerate(mapPtr,
|
||||
key.GetStruct(), 1, str.GetWritableStruct());
|
||||
key.GetStruct(), 1U, str.GetWritableStruct());
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), (size_t)0);
|
||||
EXPECT_EQ(str.ToString().find("String 2"), 0U);
|
||||
|
||||
cef_string_multimap_clear(mapPtr);
|
||||
EXPECT_EQ(cef_string_multimap_size(mapPtr), 0);
|
||||
EXPECT_EQ(cef_string_multimap_size(mapPtr), 0U);
|
||||
|
||||
cef_string_multimap_free(mapPtr);
|
||||
}
|
||||
|
@ -209,10 +209,10 @@ void TestListEqual(CefRefPtr<CefListValue> val1,
|
||||
EXPECT_TRUE(val1->IsEqual(val2));
|
||||
EXPECT_TRUE(val2->IsEqual(val1));
|
||||
|
||||
int size = static_cast<int>(val1->GetSize());
|
||||
EXPECT_EQ(size, static_cast<int>(val2->GetSize()));
|
||||
size_t size = val1->GetSize();
|
||||
EXPECT_EQ(size, val2->GetSize());
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
CefValueType type = val1->GetType(i);
|
||||
EXPECT_EQ(type, val2->GetType(i));
|
||||
switch (type) {
|
||||
|
@ -310,7 +310,7 @@ class DictionaryTask : public CefTask {
|
||||
// LIST TEST HELPERS
|
||||
|
||||
// Test list null value.
|
||||
void TestListNull(CefRefPtr<CefListValue> value, int index) {
|
||||
void TestListNull(CefRefPtr<CefListValue> value, size_t index) {
|
||||
CefValueType type = value->GetType(index);
|
||||
EXPECT_TRUE(type == VTYPE_INVALID || type == VTYPE_NULL);
|
||||
|
||||
@ -319,7 +319,7 @@ void TestListNull(CefRefPtr<CefListValue> value, int index) {
|
||||
}
|
||||
|
||||
// Test list bool value.
|
||||
void TestListBool(CefRefPtr<CefListValue> value, int index) {
|
||||
void TestListBool(CefRefPtr<CefListValue> value, size_t index) {
|
||||
CefValueType type = value->GetType(index);
|
||||
EXPECT_TRUE(type == VTYPE_INVALID || type == VTYPE_NULL);
|
||||
|
||||
@ -329,7 +329,7 @@ void TestListBool(CefRefPtr<CefListValue> value, int index) {
|
||||
}
|
||||
|
||||
// Test list int value.
|
||||
void TestListInt(CefRefPtr<CefListValue> value, int index) {
|
||||
void TestListInt(CefRefPtr<CefListValue> value, size_t index) {
|
||||
CefValueType type = value->GetType(index);
|
||||
EXPECT_TRUE(type == VTYPE_INVALID || type == VTYPE_NULL);
|
||||
|
||||
@ -339,7 +339,7 @@ void TestListInt(CefRefPtr<CefListValue> value, int index) {
|
||||
}
|
||||
|
||||
// Test list double value.
|
||||
void TestListDouble(CefRefPtr<CefListValue> value, int index) {
|
||||
void TestListDouble(CefRefPtr<CefListValue> value, size_t index) {
|
||||
CefValueType type = value->GetType(index);
|
||||
EXPECT_TRUE(type == VTYPE_INVALID || type == VTYPE_NULL);
|
||||
|
||||
@ -349,7 +349,7 @@ void TestListDouble(CefRefPtr<CefListValue> value, int index) {
|
||||
}
|
||||
|
||||
// Test list string value.
|
||||
void TestListString(CefRefPtr<CefListValue> value, int index) {
|
||||
void TestListString(CefRefPtr<CefListValue> value, size_t index) {
|
||||
CefValueType type = value->GetType(index);
|
||||
EXPECT_TRUE(type == VTYPE_INVALID || type == VTYPE_NULL);
|
||||
|
||||
@ -359,7 +359,7 @@ void TestListString(CefRefPtr<CefListValue> value, int index) {
|
||||
}
|
||||
|
||||
// Test list binary value.
|
||||
void TestListBinary(CefRefPtr<CefListValue> value, int index,
|
||||
void TestListBinary(CefRefPtr<CefListValue> value, size_t index,
|
||||
char* binary_data, size_t binary_data_size,
|
||||
CefRefPtr<CefBinaryValue>& binary_value) {
|
||||
binary_value = CefBinaryValue::Create(binary_data, binary_data_size);
|
||||
@ -381,7 +381,7 @@ void TestListBinary(CefRefPtr<CefListValue> value, int index,
|
||||
}
|
||||
|
||||
// Test list dictionary value.
|
||||
void TestListDictionary(CefRefPtr<CefListValue> value, int index,
|
||||
void TestListDictionary(CefRefPtr<CefListValue> value, size_t index,
|
||||
CefRefPtr<CefDictionaryValue>& dictionary_value) {
|
||||
dictionary_value = CefDictionaryValue::Create();
|
||||
EXPECT_TRUE(dictionary_value.get());
|
||||
@ -407,7 +407,7 @@ void TestListDictionary(CefRefPtr<CefListValue> value, int index,
|
||||
}
|
||||
|
||||
// Test list list value.
|
||||
void TestListList(CefRefPtr<CefListValue> value, int index,
|
||||
void TestListList(CefRefPtr<CefListValue> value, size_t index,
|
||||
CefRefPtr<CefListValue>& list_value) {
|
||||
list_value = CefListValue::Create();
|
||||
EXPECT_TRUE(list_value.get());
|
||||
@ -467,6 +467,12 @@ void TestList(CefRefPtr<CefListValue> value,
|
||||
// Test the size.
|
||||
EXPECT_EQ(8U, value->GetSize());
|
||||
|
||||
// Test various operations with invalid index.
|
||||
EXPECT_FALSE(list_value->Remove(9U));
|
||||
EXPECT_TRUE(list_value->GetType(10U) == VTYPE_INVALID);
|
||||
EXPECT_FALSE(list_value->GetValue(11U).get() != nullptr &&
|
||||
list_value->GetValue(11U)->IsValid());
|
||||
|
||||
// Test copy.
|
||||
CefRefPtr<CefListValue> copy = value->Copy();
|
||||
TestListEqual(value, copy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user