Lines Matching defs:NewCallback
754 // method with a particular set of parameters, use the NewCallback() function.
763 // Closure* callback = NewCallback(&FooDone, response);
780 // Closure* callback = NewCallback(this, &Handler::FooDone, response);
786 // Currently NewCallback() supports binding zero, one, or two arguments.
788 // Callbacks created with NewCallback() automatically delete themselves when
795 // Note that NewCallback() is a bit touchy regarding argument types. Generally,
799 // NewCallback(&Foo, "foo"); // WON'T WORK: const char* != string
800 // NewCallback(&Foo, string("foo")); // WORKS
804 // NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes.
952 inline Closure* NewCallback(void (*function)()) {
963 inline Closure* NewCallback(Class* object, void (Class::*method)()) {
975 inline Closure* NewCallback(void (*function)(Arg1),
989 inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1),
1003 inline Closure* NewCallback(void (*function)(Arg1, Arg2),
1019 inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1, Arg2),
1035 // Closure* nothing = NewCallback(&DoNothing);