| 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_MESSAGE_FILTER_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_FILTER_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_FILTER_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/bindings/message.h" | 8 #include "mojo/public/cpp/bindings/message.h" |
| 9 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 MessageReceiver* sink_; | 26 MessageReceiver* sink_; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // A trivial filter that simply forwards every message it receives to |sink_|. | 29 // A trivial filter that simply forwards every message it receives to |sink_|. |
| 30 class PassThroughFilter : public MessageFilter { | 30 class PassThroughFilter : public MessageFilter { |
| 31 public: | 31 public: |
| 32 explicit PassThroughFilter(MessageReceiver* sink = NULL); | 32 explicit PassThroughFilter(MessageReceiver* sink = NULL); |
| 33 | 33 |
| 34 virtual bool Accept(Message* message) MOJO_OVERRIDE; | 34 virtual bool Accept(Message* message) override; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace mojo | 37 } // namespace mojo |
| 38 | 38 |
| 39 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_FILTER_H_ | 39 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_FILTER_H_ |
| OLD | NEW |