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_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "mojo/public/cpp/bindings/bindings_export.h" |
13 #include "mojo/public/cpp/bindings/message.h" | 15 #include "mojo/public/cpp/bindings/message.h" |
14 | 16 |
15 namespace mojo { | 17 namespace mojo { |
16 | 18 |
17 class FilterChain : public MessageReceiver { | 19 class MOJO_CPP_BINDINGS_EXPORT FilterChain |
| 20 : NON_EXPORTED_BASE(public MessageReceiver) { |
18 public: | 21 public: |
19 // Doesn't take ownership of |sink|. Therefore |sink| has to stay alive while | 22 // Doesn't take ownership of |sink|. Therefore |sink| has to stay alive while |
20 // this object is alive. | 23 // this object is alive. |
21 explicit FilterChain(MessageReceiver* sink = nullptr); | 24 explicit FilterChain(MessageReceiver* sink = nullptr); |
22 | 25 |
23 FilterChain(FilterChain&& other); | 26 FilterChain(FilterChain&& other); |
24 FilterChain& operator=(FilterChain&& other); | 27 FilterChain& operator=(FilterChain&& other); |
25 ~FilterChain() override; | 28 ~FilterChain() override; |
26 | 29 |
27 template <typename FilterType, typename... Args> | 30 template <typename FilterType, typename... Args> |
(...skipping 21 matching lines...) Expand all Loading... |
49 Append(base::MakeUnique<FilterType>(std::forward<Args>(args)...)); | 52 Append(base::MakeUnique<FilterType>(std::forward<Args>(args)...)); |
50 } | 53 } |
51 | 54 |
52 template <> | 55 template <> |
53 inline void FilterChain::Append<PassThroughFilter>() { | 56 inline void FilterChain::Append<PassThroughFilter>() { |
54 } | 57 } |
55 | 58 |
56 } // namespace mojo | 59 } // namespace mojo |
57 | 60 |
58 #endif // MOJO_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ | 61 #endif // MOJO_PUBLIC_CPP_BINDINGS_FILTER_CHAIN_H_ |
OLD | NEW |