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 // This is a "No Compile Test" suite. |
| 6 // http://dev.chromium.org/developers/testing/no-compile-tests |
| 7 |
5 #include "base/callback_list.h" | 8 #include "base/callback_list.h" |
6 | 9 |
7 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
8 #include "base/bind.h" | 11 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
10 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
11 | 14 |
12 namespace base { | 15 namespace base { |
13 | 16 |
14 class Foo { | 17 class Foo { |
(...skipping 27 matching lines...) Expand all Loading... |
42 FooListener f; | 45 FooListener f; |
43 CallbackList<void(scoped_ptr<Foo>)> c1; | 46 CallbackList<void(scoped_ptr<Foo>)> c1; |
44 scoped_ptr<CallbackList<void(scoped_ptr<Foo>)>::Subscription> sub = | 47 scoped_ptr<CallbackList<void(scoped_ptr<Foo>)>::Subscription> sub = |
45 c1.Add(Bind(&FooListener::GotAScopedFoo, Unretained(&f))); | 48 c1.Add(Bind(&FooListener::GotAScopedFoo, Unretained(&f))); |
46 c1.Notify(scoped_ptr<Foo>(new Foo())); | 49 c1.Notify(scoped_ptr<Foo>(new Foo())); |
47 } | 50 } |
48 | 51 |
49 #endif | 52 #endif |
50 | 53 |
51 } // namespace base | 54 } // namespace base |
OLD | NEW |