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

Side by Side Diff: gin/function_template.h

Issue 120043008: Add a simple one shot and repeating timer API for Mojo.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build Created 6 years, 12 months 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 | « no previous file | gin/function_template.h.pump » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This file was GENERATED by command: 1 // This file was GENERATED by command:
2 // pump.py function_template.h.pump 2 // pump.py function_template.h.pump
3 // DO NOT EDIT BY HAND!!! 3 // DO NOT EDIT BY HAND!!!
4 4
5 5
6 6
7 #ifndef GIN_FUNCTION_TEMPLATE_H_ 7 #ifndef GIN_FUNCTION_TEMPLATE_H_
8 #define GIN_FUNCTION_TEMPLATE_H_ 8 #define GIN_FUNCTION_TEMPLATE_H_
9 9
10 // Copyright 2013 The Chromium Authors. All rights reserved. 10 // Copyright 2013 The Chromium Authors. All rights reserved.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 // For advanced use cases, we allow callers to request the unparsed Arguments 265 // For advanced use cases, we allow callers to request the unparsed Arguments
266 // object and poke around in it directly. 266 // object and poke around in it directly.
267 inline bool GetNextArgument(Arguments* args, int create_flags, bool is_first, 267 inline bool GetNextArgument(Arguments* args, int create_flags, bool is_first,
268 Arguments* result) { 268 Arguments* result) {
269 *result = *args; 269 *result = *args;
270 return true; 270 return true;
271 } 271 }
272 272
273 // It's common for clients to just need the isolate, so we make that easy.
274 inline bool GetNextArgument(Arguments* args, int create_flags,
275 bool is_first, v8::Isolate** result) {
276 *result = args->isolate();
277 return true;
278 }
279
273 280
274 // DispatchToCallback converts all the JavaScript arguments to C++ types and 281 // DispatchToCallback converts all the JavaScript arguments to C++ types and
275 // invokes the base::Callback. 282 // invokes the base::Callback.
276 template<typename Sig> 283 template<typename Sig>
277 struct Dispatcher { 284 struct Dispatcher {
278 }; 285 };
279 286
280 template<typename R> 287 template<typename R>
281 struct Dispatcher<R()> { 288 struct Dispatcher<R()> {
282 static void DispatchToCallback( 289 static void DispatchToCallback(
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 isolate, new HolderT(callback, callback_flags)); 475 isolate, new HolderT(callback, callback_flags));
469 return v8::FunctionTemplate::New( 476 return v8::FunctionTemplate::New(
470 isolate, 477 isolate,
471 &internal::Dispatcher<Sig>::DispatchToCallback, 478 &internal::Dispatcher<Sig>::DispatchToCallback,
472 ConvertToV8<internal::CallbackHolderBase*>(isolate, holder.get())); 479 ConvertToV8<internal::CallbackHolderBase*>(isolate, holder.get()));
473 } 480 }
474 481
475 } // namespace gin 482 } // namespace gin
476 483
477 #endif // GIN_FUNCTION_TEMPLATE_H_ 484 #endif // GIN_FUNCTION_TEMPLATE_H_
OLDNEW
« no previous file with comments | « no previous file | gin/function_template.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698