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

Unified Diff: base/mach_ipc_mac.h

Issue 3443002: [Mac] Replace the existing browser-child mach ipc with a long-lived listener ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/mach_ipc_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mach_ipc_mac.h
===================================================================
--- base/mach_ipc_mac.h (revision 59759)
+++ base/mach_ipc_mac.h (working copy)
@@ -20,7 +20,7 @@
//
// The three main classes of interest are
//
-// MachMessage: a wrapper for a mach message of the following form
+// MachMessage: a wrapper for a Mach message of the following form
// mach_msg_header_t
// mach_msg_body_t
// optional descriptors
@@ -30,10 +30,10 @@
// and are used instead of MachMessage which is an abstract base class
//
// ReceivePort:
-// Represents a mach port for which we have receive rights
+// Represents a Mach port for which we have receive rights
//
// MachPortSender:
-// Represents a mach port for which we have send rights
+// Represents a Mach port for which we have send rights
//
// Here's an example to receive a message on a server port:
//
@@ -127,7 +127,7 @@
};
//==============================================================================
-// MachMessage: a wrapper for a mach message
+// MachMessage: a wrapper for a Mach message
// (mach_msg_header_t, mach_msg_body_t, extra data)
//
// This considerably simplifies the construction of a message for sending
@@ -165,7 +165,7 @@
int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); }
- // Adds a descriptor (typically a mach port) to be translated
+ // Adds a descriptor (typically a Mach port) to be translated
// returns true if successful, otherwise not enough space
bool AddDescriptor(const MachMsgPortDescriptor &desc);
@@ -175,7 +175,7 @@
MachMsgPortDescriptor *GetDescriptor(int n);
- // Convenience method which gets the mach port described by the descriptor
+ // Convenience method which gets the Mach port described by the descriptor
mach_port_t GetTranslatedPort(int n);
// A simple message is one with no descriptors
@@ -212,7 +212,7 @@
int CalculateSize();
// Returns total storage size that this object can grow to, this is inclusive
- // of the mach header.
+ // of the Mach header.
size_t MaxSize() const { return storage_length_bytes_; }
protected:
@@ -242,7 +242,7 @@
//==============================================================================
// MachReceiveMessage and MachSendMessage are useful to separate the idea
-// of a mach message being sent and being received, and adds increased type
+// of a Mach message being sent and being received, and adds increased type
// safety:
// ReceivePort::WaitForMessage() only accepts a MachReceiveMessage
// MachPortSender::SendMessage() only accepts a MachSendMessage
@@ -271,26 +271,27 @@
};
//==============================================================================
-// Represents a mach port for which we have receive rights
+// Represents a Mach port for which we have receive rights
class ReceivePort {
public:
- // Creates a new mach port for receiving messages and registers a name for it
+ // Creates a new Mach port for receiving messages and registers a name for it
explicit ReceivePort(const char *receive_port_name);
- // Given an already existing mach port, use it. We take ownership of the
+ // Given an already existing Mach port, use it. We take ownership of the
// port and deallocate it in our destructor.
explicit ReceivePort(mach_port_t receive_port);
- // Create a new mach port for receiving messages
+ // Create a new Mach port for receiving messages
ReceivePort();
~ReceivePort();
- // Waits on the mach port until message received or timeout
+ // Waits on the Mach port until message received or timeout. If |timeout| is
+ // MACH_MSG_TIMEOUT_NONE, this method waits forever.
kern_return_t WaitForMessage(MachReceiveMessage *out_message,
mach_msg_timeout_t timeout);
- // The underlying mach port that we wrap
+ // The underlying Mach port that we wrap
mach_port_t GetPort() const { return port_; }
private:
@@ -301,14 +302,14 @@
};
//==============================================================================
-// Represents a mach port for which we have send rights
+// Represents a Mach port for which we have send rights
class MachPortSender {
public:
// get a port with send rights corresponding to a named registered service
explicit MachPortSender(const char *receive_port_name);
- // Given an already existing mach port, use it. Does not take ownership of
+ // Given an already existing Mach port, use it. Does not take ownership of
// |send_port|.
explicit MachPortSender(mach_port_t send_port);
« no previous file with comments | « no previous file | base/mach_ipc_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698