OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 IPC_IPC_TEST_SINK_H_ | 5 #ifndef IPC_IPC_TEST_SINK_H_ |
6 #define IPC_IPC_TEST_SINK_H_ | 6 #define IPC_IPC_TEST_SINK_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 TestSink(); | 75 TestSink(); |
76 virtual ~TestSink(); | 76 virtual ~TestSink(); |
77 | 77 |
78 // Interface in IPC::Channel. This copies the message to the sink and then | 78 // Interface in IPC::Channel. This copies the message to the sink and then |
79 // deletes it. | 79 // deletes it. |
80 virtual bool Send(IPC::Message* message) OVERRIDE; | 80 virtual bool Send(IPC::Message* message) OVERRIDE; |
81 virtual bool Connect() OVERRIDE WARN_UNUSED_RESULT; | 81 virtual bool Connect() OVERRIDE WARN_UNUSED_RESULT; |
82 virtual void Close() OVERRIDE; | 82 virtual void Close() OVERRIDE; |
83 virtual base::ProcessId GetPeerPID() const OVERRIDE; | 83 virtual base::ProcessId GetPeerPID() const OVERRIDE; |
84 virtual base::ProcessId GetSelfPID() const OVERRIDE; | 84 virtual base::ProcessId GetSelfPID() const OVERRIDE; |
85 virtual ChannelHandle TakePipeHandle() OVERRIDE; | |
86 | 85 |
87 #if defined(OS_POSIX) && !defined(OS_NACL) | 86 #if defined(OS_POSIX) && !defined(OS_NACL) |
88 virtual int GetClientFileDescriptor() const OVERRIDE; | 87 virtual int GetClientFileDescriptor() const OVERRIDE; |
89 virtual int TakeClientFileDescriptor() OVERRIDE; | 88 virtual int TakeClientFileDescriptor() OVERRIDE; |
90 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 89 #endif // defined(OS_POSIX) && !defined(OS_NACL) |
91 | 90 |
92 // Used by the source of the messages to send the message to the sink. This | 91 // Used by the source of the messages to send the message to the sink. This |
93 // will make a copy of the message and store it in the list. | 92 // will make a copy of the message and store it in the list. |
94 bool OnMessageReceived(const Message& msg); | 93 bool OnMessageReceived(const Message& msg); |
95 | 94 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // The actual list of received messages. | 129 // The actual list of received messages. |
131 std::vector<Message> messages_; | 130 std::vector<Message> messages_; |
132 ObserverList<Listener> filter_list_; | 131 ObserverList<Listener> filter_list_; |
133 | 132 |
134 DISALLOW_COPY_AND_ASSIGN(TestSink); | 133 DISALLOW_COPY_AND_ASSIGN(TestSink); |
135 }; | 134 }; |
136 | 135 |
137 } // namespace IPC | 136 } // namespace IPC |
138 | 137 |
139 #endif // IPC_IPC_TEST_SINK_H_ | 138 #endif // IPC_IPC_TEST_SINK_H_ |
OLD | NEW |