- 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:
Marshall Greenblatt
2011-04-07 01:58:49 +00:00
parent 36f3f3d021
commit 7ec29b5d87
19 changed files with 772 additions and 17 deletions

View File

@ -68,12 +68,19 @@ public:
virtual CefRefPtr<CefBrowser> GetBrowser();
virtual CefRefPtr<CefFrame> GetFrame();
virtual CefRefPtr<CefV8Value> GetGlobal();
virtual bool Enter();
virtual bool Exit();
v8::Local<v8::Context> GetContext();
WebKit::WebFrame* GetWebFrame();
protected:
scoped_refptr<CefV8ContextHandle> v8_context_;
#ifdef _DEBUG
// Used in debug builds to catch missing Exits in destructor.
int enter_count_;
#endif
};
// Special class for a v8::Value to ensure that it is deleted from the UI
@ -109,6 +116,7 @@ public:
virtual bool IsObject();
virtual bool IsArray();
virtual bool IsFunction();
virtual bool IsSame(CefRefPtr<CefV8Value> value);
virtual bool GetBoolValue();
virtual int GetIntValue();
virtual double GetDoubleValue();
@ -121,6 +129,8 @@ public:
virtual CefRefPtr<CefV8Value> GetValue(int index);
virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value);
virtual bool SetValue(int index, CefRefPtr<CefV8Value> value);
virtual bool SetValue(const CefString& key, AccessControl settings,
PropertyAttribute attribute);
virtual bool GetKeys(std::vector<CefString>& keys);
virtual CefRefPtr<CefBase> GetUserData();
virtual int GetArrayLength();