| OLD | NEW |
| 1 $$ This is a pump file for generating file templates. Pump is a python | 1 $$ This is a pump file for generating file templates. Pump is a python |
| 2 $$ script that is part of the Google Test suite of utilities. Description | 2 $$ script that is part of the Google Test suite of utilities. Description |
| 3 $$ can be found here: | 3 $$ can be found here: |
| 4 $$ | 4 $$ |
| 5 $$ http://code.google.com/p/googletest/wiki/PumpManual | 5 $$ http://code.google.com/p/googletest/wiki/PumpManual |
| 6 $$ | 6 $$ |
| 7 | 7 |
| 8 $$ See comment for MAX_ARITY in base/bind.h.pump. | 8 $$ See comment for MAX_ARITY in base/bind.h.pump. |
| 9 $var MAX_ARITY = 7 | 9 $var MAX_ARITY = 7 |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // MyWidgetListener::~MyWidgetListener() { | 63 // MyWidgetListener::~MyWidgetListener() { |
| 64 // // Subscription gets deleted automatically and will deregister | 64 // // Subscription gets deleted automatically and will deregister |
| 65 // // the callback in the process. | 65 // // the callback in the process. |
| 66 // } | 66 // } |
| 67 // | 67 // |
| 68 // private: | 68 // private: |
| 69 // void OnFoo(const Foo& foo) { | 69 // void OnFoo(const Foo& foo) { |
| 70 // // Do something. | 70 // // Do something. |
| 71 // } | 71 // } |
| 72 // | 72 // |
| 73 // scoped_ptr<base::CallbackRegistry<Foo>::Subscription> foo_subscription_; | 73 // scoped_ptr<base::CallbackRegistry<void(const Foo&)>::Subscription> |
| 74 // foo_subscription_; |
| 74 // }; | 75 // }; |
| 75 | 76 |
| 76 namespace base { | 77 namespace base { |
| 77 | 78 |
| 78 namespace internal { | 79 namespace internal { |
| 79 | 80 |
| 80 template <typename CallbackType> | 81 template <typename CallbackType> |
| 81 class CallbackRegistryBase { | 82 class CallbackRegistryBase { |
| 82 public: | 83 public: |
| 83 class Subscription { | 84 class Subscription { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 235 |
| 235 private: | 236 private: |
| 236 DISALLOW_COPY_AND_ASSIGN(CallbackRegistry); | 237 DISALLOW_COPY_AND_ASSIGN(CallbackRegistry); |
| 237 }; | 238 }; |
| 238 | 239 |
| 239 | 240 |
| 240 ]] $$ for ARITY | 241 ]] $$ for ARITY |
| 241 } // namespace base | 242 } // namespace base |
| 242 | 243 |
| 243 #endif // BASE_CALLBACK_REGISTRY_H | 244 #endif // BASE_CALLBACK_REGISTRY_H |
| 245 // NOSUBMIT: Force git to add file for readability. |
| OLD | NEW |