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_PIPE_CONTROL_MESSAGE_PROXY_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_PROXY_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_PROXY_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_PROXY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "mojo/public/cpp/bindings/interface_id.h" | 9 #include "mojo/public/cpp/bindings/interface_id.h" |
10 #include "mojo/public/cpp/bindings/lib/serialization_context.h" | 10 #include "mojo/public/cpp/bindings/lib/serialization_context.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 | 13 |
14 class MessageReceiver; | 14 class MessageReceiver; |
15 | 15 |
16 namespace internal { | |
17 | |
18 // Proxy for request messages defined in pipe_control_messages.mojom. | 16 // Proxy for request messages defined in pipe_control_messages.mojom. |
19 class PipeControlMessageProxy { | 17 class PipeControlMessageProxy { |
20 public: | 18 public: |
21 // Doesn't take ownership of |receiver|. It must outlive this object. | 19 // Doesn't take ownership of |receiver|. It must outlive this object. |
22 explicit PipeControlMessageProxy(MessageReceiver* receiver); | 20 explicit PipeControlMessageProxy(MessageReceiver* receiver); |
23 | 21 |
24 void NotifyPeerEndpointClosed(InterfaceId id); | 22 void NotifyPeerEndpointClosed(InterfaceId id); |
25 void NotifyEndpointClosedBeforeSent(InterfaceId id); | 23 void NotifyEndpointClosedBeforeSent(InterfaceId id); |
26 | 24 |
27 private: | 25 private: |
28 // Not owned. | 26 // Not owned. |
29 MessageReceiver* receiver_; | 27 MessageReceiver* receiver_; |
30 SerializationContext context_; | 28 internal::SerializationContext context_; |
31 | 29 |
32 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageProxy); | 30 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageProxy); |
33 }; | 31 }; |
34 | 32 |
35 } // namespace internal | |
36 } // namespace mojo | 33 } // namespace mojo |
37 | 34 |
38 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_PROXY_H_ | 35 #endif // MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_PROXY_H_ |
OLD | NEW |