Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: mojo/edk/js/handle.h

Issue 703273002: Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442ac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content/child -> mojo/common linking Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/js/drain_data.cc ('k') | mojo/edk/js/handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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<>
« no previous file with comments | « mojo/edk/js/drain_data.cc ('k') | mojo/edk/js/handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698