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

Side by Side Diff: chrome/common/ipc_channel.h

Issue 79020: linux (and some posix): multiprocess plugins compiling. (Closed)
Patch Set: rebased Created 11 years, 8 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
« no previous file with comments | « chrome/common/child_process_host.h ('k') | chrome/common/ipc_channel_posix.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_IPC_CHANNEL_H_ 5 #ifndef CHROME_COMMON_IPC_CHANNEL_H_
6 #define CHROME_COMMON_IPC_CHANNEL_H_ 6 #define CHROME_COMMON_IPC_CHANNEL_H_
7 7
8 #include "chrome/common/ipc_message.h" 8 #include "chrome/common/ipc_message.h"
9 9
10 namespace IPC { 10 namespace IPC {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 #if defined(OS_POSIX) 88 #if defined(OS_POSIX)
89 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the 89 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the
90 // FD # for the client end of the socket and the equivalent FD# to use for 90 // FD # for the client end of the socket and the equivalent FD# to use for
91 // mapping it into the Child process. 91 // mapping it into the Child process.
92 // This method may only be called on the server side of a channel. 92 // This method may only be called on the server side of a channel.
93 // 93 //
94 // If the kTestingChannelID flag is specified on the command line then 94 // If the kTestingChannelID flag is specified on the command line then
95 // a named FIFO is used as the channel transport mechanism rather than a 95 // a named FIFO is used as the channel transport mechanism rather than a
96 // socketpair() in which case this method returns -1 for both parameters. 96 // socketpair() in which case this method returns -1 for both parameters.
97 void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd); 97 void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
98 98
99 // Call this method on the server side of the IPC Channel once a client is 99 // Call this method on the server side of the IPC Channel once a client is
100 // connected in order to close the client side of the socketpair(). 100 // connected in order to close the client side of the socketpair().
101 void OnClientConnected(); 101 void OnClientConnected();
102 #endif // defined(OS_POSIX) 102 #endif // defined(OS_POSIX)
103 103
104 private: 104 private:
105 // PIMPL to which all channel calls are delegated. 105 // PIMPL to which all channel calls are delegated.
106 class ChannelImpl; 106 class ChannelImpl;
107 ChannelImpl *channel_impl_; 107 ChannelImpl *channel_impl_;
108 108
109 // The Hello message is internal to the Channel class. It is sent 109 // The Hello message is internal to the Channel class. It is sent
110 // by the peer when the channel is connected. The message contains 110 // by the peer when the channel is connected. The message contains
111 // just the process id (pid). The message has a special routing_id 111 // just the process id (pid). The message has a special routing_id
112 // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE). 112 // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE).
113 enum { 113 enum {
114 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), 114 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16),
115 // to avoid conflicting with normal 115 // to avoid conflicting with normal
116 // message types, which are enumeration 116 // message types, which are enumeration
117 // constants starting from 0. 117 // constants starting from 0.
118 }; 118 };
119 }; 119 };
120 120
121 } // namespace IPC 121 } // namespace IPC
122 122
123 #endif // CHROME_COMMON_IPC_CHANNEL_H_ 123 #endif // CHROME_COMMON_IPC_CHANNEL_H_
OLDNEW
« no previous file with comments | « chrome/common/child_process_host.h ('k') | chrome/common/ipc_channel_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698