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

Side by Side Diff: base/callback.h

Issue 8897005: Redo r113722 - Add Pass(), which implements move semantics, to scoped_ptr, scoped_array.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix stupid C++98 warning. Created 9 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 | « base/bind_unittest.cc ('k') | base/callback.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 callback.h.pump 2 // pump.py callback.h.pump
3 // DO NOT EDIT BY HAND!!! 3 // DO NOT EDIT BY HAND!!!
4 4
5 5
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style license that can be 7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file. 8 // found in the LICENSE file.
9 9
10 #ifndef BASE_CALLBACK_H_ 10 #ifndef BASE_CALLBACK_H_
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 bool Equals(const Callback& other) const { 307 bool Equals(const Callback& other) const {
308 return CallbackBase::Equals(other); 308 return CallbackBase::Equals(other);
309 } 309 }
310 310
311 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const { 311 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const {
312 PolymorphicInvoke f = 312 PolymorphicInvoke f =
313 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 313 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
314 314
315 return f(bind_state_.get(), a1); 315 return f(bind_state_.get(), internal::CallbackForward(a1));
316 } 316 }
317 317
318 private: 318 private:
319 typedef R(*PolymorphicInvoke)( 319 typedef R(*PolymorphicInvoke)(
320 internal::BindStateBase*, 320 internal::BindStateBase*,
321 typename internal::CallbackParamTraits<A1>::ForwardType); 321 typename internal::CallbackParamTraits<A1>::ForwardType);
322 322
323 }; 323 };
324 324
325 template <typename R, typename A1, typename A2> 325 template <typename R, typename A1, typename A2>
(...skipping 22 matching lines...) Expand all
348 348
349 bool Equals(const Callback& other) const { 349 bool Equals(const Callback& other) const {
350 return CallbackBase::Equals(other); 350 return CallbackBase::Equals(other);
351 } 351 }
352 352
353 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 353 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
354 typename internal::CallbackParamTraits<A2>::ForwardType a2) const { 354 typename internal::CallbackParamTraits<A2>::ForwardType a2) const {
355 PolymorphicInvoke f = 355 PolymorphicInvoke f =
356 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 356 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
357 357
358 return f(bind_state_.get(), a1, 358 return f(bind_state_.get(), internal::CallbackForward(a1),
359 a2); 359 internal::CallbackForward(a2));
360 } 360 }
361 361
362 private: 362 private:
363 typedef R(*PolymorphicInvoke)( 363 typedef R(*PolymorphicInvoke)(
364 internal::BindStateBase*, 364 internal::BindStateBase*,
365 typename internal::CallbackParamTraits<A1>::ForwardType, 365 typename internal::CallbackParamTraits<A1>::ForwardType,
366 typename internal::CallbackParamTraits<A2>::ForwardType); 366 typename internal::CallbackParamTraits<A2>::ForwardType);
367 367
368 }; 368 };
369 369
(...skipping 24 matching lines...) Expand all
394 bool Equals(const Callback& other) const { 394 bool Equals(const Callback& other) const {
395 return CallbackBase::Equals(other); 395 return CallbackBase::Equals(other);
396 } 396 }
397 397
398 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 398 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
399 typename internal::CallbackParamTraits<A2>::ForwardType a2, 399 typename internal::CallbackParamTraits<A2>::ForwardType a2,
400 typename internal::CallbackParamTraits<A3>::ForwardType a3) const { 400 typename internal::CallbackParamTraits<A3>::ForwardType a3) const {
401 PolymorphicInvoke f = 401 PolymorphicInvoke f =
402 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 402 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
403 403
404 return f(bind_state_.get(), a1, 404 return f(bind_state_.get(), internal::CallbackForward(a1),
405 a2, 405 internal::CallbackForward(a2),
406 a3); 406 internal::CallbackForward(a3));
407 } 407 }
408 408
409 private: 409 private:
410 typedef R(*PolymorphicInvoke)( 410 typedef R(*PolymorphicInvoke)(
411 internal::BindStateBase*, 411 internal::BindStateBase*,
412 typename internal::CallbackParamTraits<A1>::ForwardType, 412 typename internal::CallbackParamTraits<A1>::ForwardType,
413 typename internal::CallbackParamTraits<A2>::ForwardType, 413 typename internal::CallbackParamTraits<A2>::ForwardType,
414 typename internal::CallbackParamTraits<A3>::ForwardType); 414 typename internal::CallbackParamTraits<A3>::ForwardType);
415 415
416 }; 416 };
(...skipping 26 matching lines...) Expand all
443 return CallbackBase::Equals(other); 443 return CallbackBase::Equals(other);
444 } 444 }
445 445
446 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 446 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
447 typename internal::CallbackParamTraits<A2>::ForwardType a2, 447 typename internal::CallbackParamTraits<A2>::ForwardType a2,
448 typename internal::CallbackParamTraits<A3>::ForwardType a3, 448 typename internal::CallbackParamTraits<A3>::ForwardType a3,
449 typename internal::CallbackParamTraits<A4>::ForwardType a4) const { 449 typename internal::CallbackParamTraits<A4>::ForwardType a4) const {
450 PolymorphicInvoke f = 450 PolymorphicInvoke f =
451 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 451 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
452 452
453 return f(bind_state_.get(), a1, 453 return f(bind_state_.get(), internal::CallbackForward(a1),
454 a2, 454 internal::CallbackForward(a2),
455 a3, 455 internal::CallbackForward(a3),
456 a4); 456 internal::CallbackForward(a4));
457 } 457 }
458 458
459 private: 459 private:
460 typedef R(*PolymorphicInvoke)( 460 typedef R(*PolymorphicInvoke)(
461 internal::BindStateBase*, 461 internal::BindStateBase*,
462 typename internal::CallbackParamTraits<A1>::ForwardType, 462 typename internal::CallbackParamTraits<A1>::ForwardType,
463 typename internal::CallbackParamTraits<A2>::ForwardType, 463 typename internal::CallbackParamTraits<A2>::ForwardType,
464 typename internal::CallbackParamTraits<A3>::ForwardType, 464 typename internal::CallbackParamTraits<A3>::ForwardType,
465 typename internal::CallbackParamTraits<A4>::ForwardType); 465 typename internal::CallbackParamTraits<A4>::ForwardType);
466 466
(...skipping 29 matching lines...) Expand all
496 } 496 }
497 497
498 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 498 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
499 typename internal::CallbackParamTraits<A2>::ForwardType a2, 499 typename internal::CallbackParamTraits<A2>::ForwardType a2,
500 typename internal::CallbackParamTraits<A3>::ForwardType a3, 500 typename internal::CallbackParamTraits<A3>::ForwardType a3,
501 typename internal::CallbackParamTraits<A4>::ForwardType a4, 501 typename internal::CallbackParamTraits<A4>::ForwardType a4,
502 typename internal::CallbackParamTraits<A5>::ForwardType a5) const { 502 typename internal::CallbackParamTraits<A5>::ForwardType a5) const {
503 PolymorphicInvoke f = 503 PolymorphicInvoke f =
504 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 504 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
505 505
506 return f(bind_state_.get(), a1, 506 return f(bind_state_.get(), internal::CallbackForward(a1),
507 a2, 507 internal::CallbackForward(a2),
508 a3, 508 internal::CallbackForward(a3),
509 a4, 509 internal::CallbackForward(a4),
510 a5); 510 internal::CallbackForward(a5));
511 } 511 }
512 512
513 private: 513 private:
514 typedef R(*PolymorphicInvoke)( 514 typedef R(*PolymorphicInvoke)(
515 internal::BindStateBase*, 515 internal::BindStateBase*,
516 typename internal::CallbackParamTraits<A1>::ForwardType, 516 typename internal::CallbackParamTraits<A1>::ForwardType,
517 typename internal::CallbackParamTraits<A2>::ForwardType, 517 typename internal::CallbackParamTraits<A2>::ForwardType,
518 typename internal::CallbackParamTraits<A3>::ForwardType, 518 typename internal::CallbackParamTraits<A3>::ForwardType,
519 typename internal::CallbackParamTraits<A4>::ForwardType, 519 typename internal::CallbackParamTraits<A4>::ForwardType,
520 typename internal::CallbackParamTraits<A5>::ForwardType); 520 typename internal::CallbackParamTraits<A5>::ForwardType);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 553 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
554 typename internal::CallbackParamTraits<A2>::ForwardType a2, 554 typename internal::CallbackParamTraits<A2>::ForwardType a2,
555 typename internal::CallbackParamTraits<A3>::ForwardType a3, 555 typename internal::CallbackParamTraits<A3>::ForwardType a3,
556 typename internal::CallbackParamTraits<A4>::ForwardType a4, 556 typename internal::CallbackParamTraits<A4>::ForwardType a4,
557 typename internal::CallbackParamTraits<A5>::ForwardType a5, 557 typename internal::CallbackParamTraits<A5>::ForwardType a5,
558 typename internal::CallbackParamTraits<A6>::ForwardType a6) const { 558 typename internal::CallbackParamTraits<A6>::ForwardType a6) const {
559 PolymorphicInvoke f = 559 PolymorphicInvoke f =
560 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 560 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
561 561
562 return f(bind_state_.get(), a1, 562 return f(bind_state_.get(), internal::CallbackForward(a1),
563 a2, 563 internal::CallbackForward(a2),
564 a3, 564 internal::CallbackForward(a3),
565 a4, 565 internal::CallbackForward(a4),
566 a5, 566 internal::CallbackForward(a5),
567 a6); 567 internal::CallbackForward(a6));
568 } 568 }
569 569
570 private: 570 private:
571 typedef R(*PolymorphicInvoke)( 571 typedef R(*PolymorphicInvoke)(
572 internal::BindStateBase*, 572 internal::BindStateBase*,
573 typename internal::CallbackParamTraits<A1>::ForwardType, 573 typename internal::CallbackParamTraits<A1>::ForwardType,
574 typename internal::CallbackParamTraits<A2>::ForwardType, 574 typename internal::CallbackParamTraits<A2>::ForwardType,
575 typename internal::CallbackParamTraits<A3>::ForwardType, 575 typename internal::CallbackParamTraits<A3>::ForwardType,
576 typename internal::CallbackParamTraits<A4>::ForwardType, 576 typename internal::CallbackParamTraits<A4>::ForwardType,
577 typename internal::CallbackParamTraits<A5>::ForwardType, 577 typename internal::CallbackParamTraits<A5>::ForwardType,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, 611 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
612 typename internal::CallbackParamTraits<A2>::ForwardType a2, 612 typename internal::CallbackParamTraits<A2>::ForwardType a2,
613 typename internal::CallbackParamTraits<A3>::ForwardType a3, 613 typename internal::CallbackParamTraits<A3>::ForwardType a3,
614 typename internal::CallbackParamTraits<A4>::ForwardType a4, 614 typename internal::CallbackParamTraits<A4>::ForwardType a4,
615 typename internal::CallbackParamTraits<A5>::ForwardType a5, 615 typename internal::CallbackParamTraits<A5>::ForwardType a5,
616 typename internal::CallbackParamTraits<A6>::ForwardType a6, 616 typename internal::CallbackParamTraits<A6>::ForwardType a6,
617 typename internal::CallbackParamTraits<A7>::ForwardType a7) const { 617 typename internal::CallbackParamTraits<A7>::ForwardType a7) const {
618 PolymorphicInvoke f = 618 PolymorphicInvoke f =
619 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 619 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
620 620
621 return f(bind_state_.get(), a1, 621 return f(bind_state_.get(), internal::CallbackForward(a1),
622 a2, 622 internal::CallbackForward(a2),
623 a3, 623 internal::CallbackForward(a3),
624 a4, 624 internal::CallbackForward(a4),
625 a5, 625 internal::CallbackForward(a5),
626 a6, 626 internal::CallbackForward(a6),
627 a7); 627 internal::CallbackForward(a7));
628 } 628 }
629 629
630 private: 630 private:
631 typedef R(*PolymorphicInvoke)( 631 typedef R(*PolymorphicInvoke)(
632 internal::BindStateBase*, 632 internal::BindStateBase*,
633 typename internal::CallbackParamTraits<A1>::ForwardType, 633 typename internal::CallbackParamTraits<A1>::ForwardType,
634 typename internal::CallbackParamTraits<A2>::ForwardType, 634 typename internal::CallbackParamTraits<A2>::ForwardType,
635 typename internal::CallbackParamTraits<A3>::ForwardType, 635 typename internal::CallbackParamTraits<A3>::ForwardType,
636 typename internal::CallbackParamTraits<A4>::ForwardType, 636 typename internal::CallbackParamTraits<A4>::ForwardType,
637 typename internal::CallbackParamTraits<A5>::ForwardType, 637 typename internal::CallbackParamTraits<A5>::ForwardType,
638 typename internal::CallbackParamTraits<A6>::ForwardType, 638 typename internal::CallbackParamTraits<A6>::ForwardType,
639 typename internal::CallbackParamTraits<A7>::ForwardType); 639 typename internal::CallbackParamTraits<A7>::ForwardType);
640 640
641 }; 641 };
642 642
643 643
644 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it 644 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it
645 // will be used in a lot of APIs with delayed execution. 645 // will be used in a lot of APIs with delayed execution.
646 typedef Callback<void(void)> Closure; 646 typedef Callback<void(void)> Closure;
647 647
648 } // namespace base 648 } // namespace base
649 649
650 #endif // BASE_CALLBACK_H 650 #endif // BASE_CALLBACK_H
OLDNEW
« no previous file with comments | « base/bind_unittest.cc ('k') | base/callback.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698