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_HANDLER_DELEGATE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_HANDLER_DELEGATE_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_DELEGATE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_HANDLER_DELEGATE_H_ |
7 | 7 |
8 #include "mojo/public/cpp/bindings/interface_id.h" | 8 #include "mojo/public/cpp/bindings/interface_id.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
11 namespace internal { | |
12 | 11 |
13 class PipeControlMessageHandlerDelegate { | 12 class PipeControlMessageHandlerDelegate { |
14 public: | 13 public: |
15 // The implementation of the following methods should return false if the | 14 // The implementation of the following methods should return false if the |
16 // notification is unexpected. In that case, the user of this delegate is | 15 // notification is unexpected. In that case, the user of this delegate is |
17 // expected to close the message pipe. | 16 // expected to close the message pipe. |
18 virtual bool OnPeerAssociatedEndpointClosed(InterfaceId id) = 0; | 17 virtual bool OnPeerAssociatedEndpointClosed(InterfaceId id) = 0; |
19 virtual bool OnAssociatedEndpointClosedBeforeSent(InterfaceId id) = 0; | 18 virtual bool OnAssociatedEndpointClosedBeforeSent(InterfaceId id) = 0; |
20 | 19 |
21 protected: | 20 protected: |
22 virtual ~PipeControlMessageHandlerDelegate() {} | 21 virtual ~PipeControlMessageHandlerDelegate() {} |
23 }; | 22 }; |
24 | 23 |
25 } // namespace internal | |
26 } // namespace mojo | 24 } // namespace mojo |
27 | 25 |
28 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_DELEGATE_H_ | 26 #endif // MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_HANDLER_DELEGATE_H_ |
OLD | NEW |