OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_LIB_CONTROL_MESSAGE_PROXY_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_PROXY_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_PROXY_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_PROXY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "mojo/public/cpp/bindings/bindings_export.h" |
14 #include "mojo/public/cpp/bindings/lib/serialization_context.h" | 15 #include "mojo/public/cpp/bindings/lib/serialization_context.h" |
15 #include "mojo/public/cpp/bindings/message.h" | 16 #include "mojo/public/cpp/bindings/message.h" |
16 | 17 |
17 namespace mojo { | 18 namespace mojo { |
18 | 19 |
19 namespace internal { | 20 namespace internal { |
20 | 21 |
21 // Proxy for request messages defined in interface_control_messages.mojom. | 22 // Proxy for request messages defined in interface_control_messages.mojom. |
22 class ControlMessageProxy { | 23 class MOJO_CPP_BINDINGS_EXPORT ControlMessageProxy { |
23 public: | 24 public: |
24 // Doesn't take ownership of |receiver|. It must outlive this object. | 25 // Doesn't take ownership of |receiver|. It must outlive this object. |
25 explicit ControlMessageProxy(MessageReceiverWithResponder* receiver); | 26 explicit ControlMessageProxy(MessageReceiverWithResponder* receiver); |
26 ~ControlMessageProxy(); | 27 ~ControlMessageProxy(); |
27 | 28 |
28 void QueryVersion(const base::Callback<void(uint32_t)>& callback); | 29 void QueryVersion(const base::Callback<void(uint32_t)>& callback); |
29 void RequireVersion(uint32_t version); | 30 void RequireVersion(uint32_t version); |
30 | 31 |
31 void FlushForTesting(); | 32 void FlushForTesting(); |
32 void SendDisconnectReason(uint32_t custom_reason, | 33 void SendDisconnectReason(uint32_t custom_reason, |
(...skipping 14 matching lines...) Expand all Loading... |
47 | 48 |
48 base::Closure run_loop_quit_closure_; | 49 base::Closure run_loop_quit_closure_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(ControlMessageProxy); | 51 DISALLOW_COPY_AND_ASSIGN(ControlMessageProxy); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace internal | 54 } // namespace internal |
54 } // namespace mojo | 55 } // namespace mojo |
55 | 56 |
56 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_PROXY_H_ | 57 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_PROXY_H_ |
OLD | NEW |