Make IPC::Channel polymorphic

This change makes each platform specific ChannelImpl into
a subclass of Channel: ChannelPosix, ChannelWin, ChannelNacl.
delegated functions are now virtual.

TEST=none
BUG=377980
[email protected], [email protected]

Review URL: https://codereview.chromium.org/310293002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275505 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc
index 070fe12..65951fb 100644
--- a/ipc/ipc_test_sink.cc
+++ b/ipc/ipc_test_sink.cc
@@ -21,6 +21,21 @@
   return true;
 }
 
+bool TestSink::Connect() {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+void TestSink::Close() {
+  NOTIMPLEMENTED();
+}
+
+base::ProcessId TestSink::GetPeerPID() const {
+  NOTIMPLEMENTED();
+  return base::ProcessId();
+}
+
+
 bool TestSink::OnMessageReceived(const Message& msg) {
   ObserverListBase<Listener>::Iterator it(filter_list_);
   Listener* observer;
@@ -74,4 +89,37 @@
   filter_list_.RemoveObserver(filter);
 }
 
+#if defined(OS_POSIX) && !defined(OS_NACL)
+
+int TestSink::GetClientFileDescriptor() const {
+  NOTREACHED();
+  return -1;
+}
+
+int TestSink::TakeClientFileDescriptor() {
+  NOTREACHED();
+  return -1;
+}
+
+bool TestSink::AcceptsConnections() const {
+  NOTREACHED();
+  return false;
+}
+
+bool TestSink::HasAcceptedConnection() const {
+  NOTREACHED();
+  return false;
+}
+
+bool TestSink::GetPeerEuid(uid_t* peer_euid) const {
+  NOTREACHED();
+  return false;
+}
+
+void TestSink::ResetToAcceptingConnectionState() {
+  NOTREACHED();
+}
+
+#endif  // defined(OS_POSIX) && !defined(OS_NACL)
+
 }  // namespace IPC