Hello,
I am a newbie Chrome extension developer. I am currently working on a
new extension for which I need to know on how to bind a c++ object to
JS.
I am trying to implement the following:
C++ Code:
Class Foo {
public:
Foo();
~Foo();
Baz GetBazOj();
private:
Baz baz_;
};
Class Baz {
public:
Baz();
~Baz();
int MethodBaz();
private:
int value_;
};
In Javascript, I want to create the instance of c++ class and access
their member functions like this:
var fooObj1 = new Foo();
var fooObj2 = new Foo();
var baz1 = fooObj1.GetBazObj();
var baz2 = fooObj2.GetBazObj();
var baz1Value = baz1.MethodBaz();
var baz2Value = baz2.MethodBaz();
In Chromium extensions internals source code, I found some reference
to NPAPI based CPPBoundClass. I thought NPAPI functions is for Plugin.
I am not sure on how to use this class to do the require c++ bindings.
Can someone provide some examples and some information regarding this?
Thanks.
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users