OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ | 5 #ifndef MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ |
6 #define MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ | 6 #define MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "mojo/public/cpp/bindings/interface_ptr.h" | 13 #include "mojo/public/cpp/bindings/interface_ptr.h" |
13 | 14 |
14 namespace mojo { | 15 namespace mojo { |
15 | 16 |
16 template <typename Interface> | 17 template <typename Interface> |
17 class WeakInterfacePtr; | 18 class WeakInterfacePtr; |
18 | 19 |
19 template <typename Interface> | 20 template <typename Interface> |
20 class WeakInterfacePtrSet { | 21 class WeakInterfacePtrSet { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 private: | 78 private: |
78 InterfacePtr<Interface> ptr_; | 79 InterfacePtr<Interface> ptr_; |
79 base::WeakPtrFactory<WeakInterfacePtr> weak_ptr_factory_; | 80 base::WeakPtrFactory<WeakInterfacePtr> weak_ptr_factory_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(WeakInterfacePtr); | 82 DISALLOW_COPY_AND_ASSIGN(WeakInterfacePtr); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace mojo | 85 } // namespace mojo |
85 | 86 |
86 #endif // MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ | 87 #endif // MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_ |
OLD | NEW |