mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add support for entering a V8 context asynchronously (issue #203).
- Add support for V8 accessors (issue #203). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@215 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/base_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8accessor_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
|
||||
@@ -79,6 +80,24 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(CefRefPtr<CefBase> user_data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateObject(CefRefPtr<CefBase> user_data,
|
||||
CefRefPtr<CefV8Accessor> accessor)
|
||||
{
|
||||
cef_base_t* baseStruct = NULL;
|
||||
if(user_data)
|
||||
baseStruct = CefBaseCppToC::Wrap(user_data);
|
||||
|
||||
cef_v8accessor_t* accessorStruct = NULL;
|
||||
if(accessor)
|
||||
accessorStruct = CefV8AccessorCppToC::Wrap(accessor);
|
||||
|
||||
cef_v8value_t* impl = cef_v8value_create_object_with_accessor(baseStruct,
|
||||
accessorStruct);
|
||||
if(impl)
|
||||
return CefV8ValueCToCpp::Wrap(impl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateArray()
|
||||
{
|
||||
cef_v8value_t* impl = cef_v8value_create_array();
|
||||
@@ -176,6 +195,14 @@ bool CefV8ValueCToCpp::IsFunction()
|
||||
return struct_->is_function(struct_)?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsSame(CefRefPtr<CefV8Value> that)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, is_same))
|
||||
return false;
|
||||
|
||||
return struct_->is_same(struct_, CefV8ValueCToCpp::Unwrap(that))?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::GetBoolValue()
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, get_bool_value))
|
||||
@@ -285,6 +312,16 @@ bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr<CefV8Value> value)
|
||||
CefV8ValueCToCpp::Unwrap(value))?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, set_value_byaccessor))
|
||||
return false;
|
||||
|
||||
return struct_->set_value_byaccessor(struct_, key.GetStruct(),
|
||||
settings, attribute)?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::GetKeys(std::vector<CefString>& keys)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, get_keys))
|
||||
|
Reference in New Issue
Block a user