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_NO_INTERFACE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ |
7 | 7 |
8 #include "mojo/public/cpp/bindings/message.h" | 8 #include "mojo/public/cpp/bindings/message.h" |
9 #include "mojo/public/cpp/bindings/message_filter.h" | 9 #include "mojo/public/cpp/bindings/message_filter.h" |
10 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class NoInterfaceProxy : public NoInterface { | 31 class NoInterfaceProxy : public NoInterface { |
32 public: | 32 public: |
33 explicit NoInterfaceProxy(MessageReceiver* receiver) {} | 33 explicit NoInterfaceProxy(MessageReceiver* receiver) {} |
34 }; | 34 }; |
35 | 35 |
36 class NoInterfaceStub : public MessageReceiverWithResponder { | 36 class NoInterfaceStub : public MessageReceiverWithResponder { |
37 public: | 37 public: |
38 NoInterfaceStub() {} | 38 NoInterfaceStub() {} |
39 void set_sink(NoInterface* sink) {} | 39 void set_sink(NoInterface* sink) {} |
40 NoInterface* sink() { return nullptr; } | 40 NoInterface* sink() { return nullptr; } |
41 virtual bool Accept(Message* message) override; | 41 bool Accept(Message* message) override; |
42 virtual bool AcceptWithResponder(Message* message, | 42 bool AcceptWithResponder(Message* message, |
43 MessageReceiver* responder) override; | 43 MessageReceiver* responder) override; |
44 }; | 44 }; |
45 | 45 |
46 // AnyInterface is for use in cases where any interface would do (e.g., see the | 46 // AnyInterface is for use in cases where any interface would do (e.g., see the |
47 // Shell::Connect method). | 47 // Shell::Connect method). |
48 | 48 |
49 typedef NoInterface AnyInterface; | 49 typedef NoInterface AnyInterface; |
50 | 50 |
51 } // namespace mojo | 51 } // namespace mojo |
52 | 52 |
53 #endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ | 53 #endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ |
OLD | NEW |