mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Hide CEF internal V8 attributes from JavaScript (issue #316).
- Add a PropertyAttribute parameter to CefV8Value::SetValue() (issue #412). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@358 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -346,14 +346,16 @@ struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex(
|
||||
}
|
||||
|
||||
int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self,
|
||||
const cef_string_t* key, struct _cef_v8value_t* value)
|
||||
const cef_string_t* key, struct _cef_v8value_t* value,
|
||||
enum cef_v8_propertyattribute_t attribute)
|
||||
{
|
||||
DCHECK(self);
|
||||
if(!self)
|
||||
return 0;
|
||||
|
||||
CefRefPtr<CefV8Value> valuePtr = CefV8ValueCppToC::Unwrap(value);
|
||||
return CefV8ValueCppToC::Get(self)->SetValue(CefString(key), valuePtr);
|
||||
return CefV8ValueCppToC::Get(self)->SetValue(CefString(key), valuePtr,
|
||||
attribute);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self,
|
||||
|
@@ -318,13 +318,13 @@ CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(int index)
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(const CefString& key,
|
||||
CefRefPtr<CefV8Value> value)
|
||||
CefRefPtr<CefV8Value> value, PropertyAttribute attribute)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, set_value_bykey))
|
||||
return false;
|
||||
|
||||
return struct_->set_value_bykey(struct_, key.GetStruct(),
|
||||
CefV8ValueCToCpp::Unwrap(value))?true:false;
|
||||
CefV8ValueCToCpp::Unwrap(value), attribute)?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr<CefV8Value> value)
|
||||
|
@@ -53,8 +53,8 @@ public:
|
||||
virtual bool DeleteValue(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(int index) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key,
|
||||
CefRefPtr<CefV8Value> value) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
virtual bool SetValue(int index, CefRefPtr<CefV8Value> value) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
|
Reference in New Issue
Block a user