| Index: mojo/edk/js/handle.h
|
| diff --git a/mojo/bindings/js/handle.h b/mojo/edk/js/handle.h
|
| similarity index 85%
|
| rename from mojo/bindings/js/handle.h
|
| rename to mojo/edk/js/handle.h
|
| index b0f250c61a5f2c99477260cbc50fa493876e929e..e363b7c4bc04589d9a7cc313c8ed96e252cc4e99 100644
|
| --- a/mojo/bindings/js/handle.h
|
| +++ b/mojo/edk/js/handle.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/observer_list.h"
|
| #include "gin/converter.h"
|
| #include "gin/handle.h"
|
| +#include "gin/object_template_builder.h"
|
| #include "gin/wrappable.h"
|
| #include "mojo/public/cpp/system/core.h"
|
|
|
| @@ -26,6 +27,11 @@ class HandleWrapper : public gin::Wrappable<HandleWrapper> {
|
| return gin::CreateHandle(isolate, new HandleWrapper(handle));
|
| }
|
|
|
| + std::string ToString();
|
| +
|
| + gin::ObjectTemplateBuilder GetObjectTemplateBuilder(v8::Isolate* isolate)
|
| + override;
|
| +
|
| mojo::Handle get() const { return handle_.get(); }
|
| mojo::Handle release() { return handle_.release(); }
|
| void Close();
|
| @@ -59,6 +65,15 @@ struct Converter<mojo::Handle> {
|
| mojo::Handle* out);
|
| };
|
|
|
| +template<>
|
| +struct Converter<mojo::MessagePipeHandle> {
|
| + static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
|
| + mojo::MessagePipeHandle val);
|
| + static bool FromV8(v8::Isolate* isolate,
|
| + v8::Handle<v8::Value> val,
|
| + mojo::MessagePipeHandle* out);
|
| +};
|
| +
|
| // We need to specialize the normal gin::Handle converter in order to handle
|
| // converting |null| to a wrapper for an empty mojo::Handle.
|
| template<>
|
|
|