Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: ipc/ipc_test_sink.h

Issue 320433002: IPC::Channel: Reduce POSIX specific API surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landig Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_test_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() WARN_UNUSED_RESULT OVERRIDE; 81 virtual bool Connect() WARN_UNUSED_RESULT OVERRIDE;
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 84
85 #if defined(OS_POSIX) && !defined(OS_NACL) 85 #if defined(OS_POSIX) && !defined(OS_NACL)
86 virtual int GetClientFileDescriptor() const OVERRIDE; 86 virtual int GetClientFileDescriptor() const OVERRIDE;
87 virtual int TakeClientFileDescriptor() OVERRIDE; 87 virtual int TakeClientFileDescriptor() OVERRIDE;
88 virtual bool AcceptsConnections() const OVERRIDE;
89 virtual bool HasAcceptedConnection() const OVERRIDE;
90 virtual bool GetPeerEuid(uid_t* peer_euid) const OVERRIDE;
91 virtual void ResetToAcceptingConnectionState() OVERRIDE;
92 #endif // defined(OS_POSIX) && !defined(OS_NACL) 88 #endif // defined(OS_POSIX) && !defined(OS_NACL)
93 89
94 // Used by the source of the messages to send the message to the sink. This 90 // Used by the source of the messages to send the message to the sink. This
95 // will make a copy of the message and store it in the list. 91 // will make a copy of the message and store it in the list.
96 bool OnMessageReceived(const Message& msg); 92 bool OnMessageReceived(const Message& msg);
97 93
98 // Returns the number of messages in the queue. 94 // Returns the number of messages in the queue.
99 size_t message_count() const { return messages_.size(); } 95 size_t message_count() const { return messages_.size(); }
100 96
101 // Clears the message queue of saved messages. 97 // Clears the message queue of saved messages.
(...skipping 30 matching lines...) Expand all
132 // The actual list of received messages. 128 // The actual list of received messages.
133 std::vector<Message> messages_; 129 std::vector<Message> messages_;
134 ObserverList<Listener> filter_list_; 130 ObserverList<Listener> filter_list_;
135 131
136 DISALLOW_COPY_AND_ASSIGN(TestSink); 132 DISALLOW_COPY_AND_ASSIGN(TestSink);
137 }; 133 };
138 134
139 } // namespace IPC 135 } // namespace IPC
140 136
141 #endif // IPC_IPC_TEST_SINK_H_ 137 #endif // IPC_IPC_TEST_SINK_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_test_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698