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

Side by Side Diff: gin/object_template_builder.cc

Issue 93813002: Implement gin::ObjectTemplateBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asdf Created 7 years 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
« no previous file with comments | « gin/object_template_builder.h ('k') | gin/test/gtest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/object_template_builder.h"
6
7 namespace gin {
8
9 ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate)
10 : isolate_(isolate), template_(v8::ObjectTemplate::New(isolate)) {
11 }
12
13 ObjectTemplateBuilder::~ObjectTemplateBuilder() {
14 }
15
16 ObjectTemplateBuilder& ObjectTemplateBuilder::SetImpl(
17 const base::StringPiece& name, v8::Handle<v8::Data> val) {
18 template_->Set(StringToSymbol(isolate_, name), val);
19 return *this;
20 }
21
22 v8::Local<v8::ObjectTemplate> ObjectTemplateBuilder::Build() {
23 v8::Local<v8::ObjectTemplate> result = template_;
24 template_.Clear();
25 return result;
26 }
27
28 } // namespace gin
OLDNEW
« no previous file with comments | « gin/object_template_builder.h ('k') | gin/test/gtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698