| OLD | NEW |
| 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 #include "base/callback_registry.h" | 5 #include "base/callback_registry.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 FooListener f; | 42 FooListener f; |
| 43 CallbackRegistry<void(scoped_ptr<Foo>)> c1; | 43 CallbackRegistry<void(scoped_ptr<Foo>)> c1; |
| 44 scoped_ptr<CallbackRegistry<void(scoped_ptr<Foo>)>::Subscription> sub = | 44 scoped_ptr<CallbackRegistry<void(scoped_ptr<Foo>)>::Subscription> sub = |
| 45 c1.Add(Bind(&FooListener::GotAScopedFoo, Unretained(&f))); | 45 c1.Add(Bind(&FooListener::GotAScopedFoo, Unretained(&f))); |
| 46 c1.Notify(scoped_ptr<Foo>(new Foo())); | 46 c1.Notify(scoped_ptr<Foo>(new Foo())); |
| 47 } | 47 } |
| 48 | 48 |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 } // namespace base | 51 } // namespace base |
| 52 // NOSUBMIT: Force git to add file for readability. |
| OLD | NEW |