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

Side by Side Diff: gin/dictionary.cc

Issue 59153005: Begin implementing V8 bindings for Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix skipped comment Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 #include "gin/dictionary.h"
6
7 namespace gin {
8
9 Dictionary::Dictionary(v8::Isolate* isolate)
10 : isolate_(isolate) {
11 }
12
13 Dictionary::Dictionary(v8::Isolate* isolate,
14 v8::Handle<v8::Object> object)
15 : isolate_(isolate),
16 object_(object) {
17 }
18
19 Dictionary::~Dictionary() {
20 }
21
22 Dictionary Dictionary::CreateEmpty(v8::Isolate* isolate) {
23 Dictionary dictionary(isolate);
24 dictionary.object_ = v8::Object::New();
25 return dictionary;
26 }
27
28 v8::Handle<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate,
29 Dictionary val) {
30 return val.object_;
31 }
32
33 bool FromV8(v8::Handle<v8::Value> val, Dictionary* out) {
34 if (!val->IsObject())
35 return false;
36 *out = Dictionary(out->isolate(), v8::Handle<v8::Object>::Cast(val));
37 return true;
38 }
39
40 } // namespace gin
OLDNEW
« gin/arguments.cc ('K') | « gin/dictionary.h ('k') | gin/gin.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698