summaryrefslogtreecommitdiffstats
path: root/mojo/apps/js/bindings/handle.h
blob: 8bae517bc6ac8362a65a89b48d772ef9c4bf7113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MOJO_APPS_JS_BINDINGS_HANDLE_H_
#define MOJO_APPS_JS_BINDINGS_HANDLE_H_

#include "gin/converter.h"
#include "mojo/public/system/core_cpp.h"

namespace gin {

template<>
struct Converter<mojo::Handle> {
  static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
                                    const mojo::Handle& val);
  static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
                     mojo::Handle* out);
};

}  // namespace gin

#endif  // MOJO_APPS_JS_BINDINGS_HANDLE_H_