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

Side by Side Diff: gin/object_template_builder.h

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | gpu/command_buffer/client/client_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GIN_OBJECT_TEMPLATE_BUILDER_H_ 5 #ifndef GIN_OBJECT_TEMPLATE_BUILDER_H_
6 #define GIN_OBJECT_TEMPLATE_BUILDER_H_ 6 #define GIN_OBJECT_TEMPLATE_BUILDER_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 v8::Local<v8::ObjectTemplate> tmpl, 64 v8::Local<v8::ObjectTemplate> tmpl,
65 T callback) { 65 T callback) {
66 CreateFunctionHandler( 66 CreateFunctionHandler(
67 isolate, tmpl, base::Bind(callback), HolderIsFirstArgument); 67 isolate, tmpl, base::Bind(callback), HolderIsFirstArgument);
68 } 68 }
69 }; 69 };
70 70
71 // This specialization allows people to construct function templates directly if 71 // This specialization allows people to construct function templates directly if
72 // they need to do fancier stuff. 72 // they need to do fancier stuff.
73 template<> 73 template<>
74 struct GIN_EXPORT CallbackTraits<v8::Handle<v8::FunctionTemplate> > { 74 struct CallbackTraits<v8::Handle<v8::FunctionTemplate> > {
75 static v8::Handle<v8::FunctionTemplate> CreateTemplate( 75 static v8::Handle<v8::FunctionTemplate> CreateTemplate(
76 v8::Handle<v8::FunctionTemplate> templ) { 76 v8::Handle<v8::FunctionTemplate> templ) {
77 return templ; 77 return templ;
78 } 78 }
79 }; 79 };
80 80
81 } // namespace 81 } // namespace
82 82
83 83
84 // ObjectTemplateBuilder provides a handy interface to creating 84 // ObjectTemplateBuilder provides a handy interface to creating
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 v8::Isolate* isolate_; 139 v8::Isolate* isolate_;
140 140
141 // ObjectTemplateBuilder should only be used on the stack. 141 // ObjectTemplateBuilder should only be used on the stack.
142 v8::Local<v8::ObjectTemplate> template_; 142 v8::Local<v8::ObjectTemplate> template_;
143 }; 143 };
144 144
145 } // namespace gin 145 } // namespace gin
146 146
147 #endif // GIN_OBJECT_TEMPLATE_BUILDER_H_ 147 #endif // GIN_OBJECT_TEMPLATE_BUILDER_H_
OLDNEW
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | gpu/command_buffer/client/client_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698