handle.h revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef MOJO_BINDINGS_JS_HANDLE_H_ 6#define MOJO_BINDINGS_JS_HANDLE_H_ 7 8#include "gin/converter.h" 9#include "mojo/public/system/core_cpp.h" 10 11namespace gin { 12 13template<> 14struct Converter<mojo::Handle> { 15 static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate, 16 const mojo::Handle& val); 17 static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val, 18 mojo::Handle* out); 19}; 20 21} // namespace gin 22 23#endif // MOJO_BINDINGS_JS_HANDLE_H_ 24