| Index: sandbox/mac/mach_message_server.h
|
| diff --git a/sandbox/mac/mach_message_server.h b/sandbox/mac/mach_message_server.h
|
| index ba0b2c40a06c9530c682573429900753b80390b4..95be5fb3306469bf4ad0a8ea79dcd1df1dd0d989 100644
|
| --- a/sandbox/mac/mach_message_server.h
|
| +++ b/sandbox/mac/mach_message_server.h
|
| @@ -5,15 +5,17 @@
|
| #ifndef SANDBOX_MAC_MACH_MESSAGE_SERVER_H_
|
| #define SANDBOX_MAC_MACH_MESSAGE_SERVER_H_
|
|
|
| -#include <dispatch/dispatch.h>
|
| #include <mach/mach.h>
|
|
|
| #include "base/mac/scoped_mach_port.h"
|
| #include "base/mac/scoped_mach_vm.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "sandbox/mac/message_server.h"
|
|
|
| namespace sandbox {
|
|
|
| +class DispatchSourceMach;
|
| +
|
| // A Mach message server that operates a receive port. Messages are received
|
| // and then passed to the MessageDemuxer for handling. The Demuxer
|
| // can use the server class to send a reply, forward the message to a
|
| @@ -53,16 +55,6 @@ class MachMessageServer : public MessageServer {
|
| // The Mach port on which the server is receiving requests.
|
| base::mac::ScopedMachReceiveRight server_port_;
|
|
|
| - // The dispatch queue used to service the server_source_.
|
| - dispatch_queue_t server_queue_;
|
| -
|
| - // A MACH_RECV dispatch source for the server_port_.
|
| - dispatch_source_t server_source_;
|
| -
|
| - // Semaphore used to wait on the |server_source_|'s cancellation in the
|
| - // destructor.
|
| - dispatch_semaphore_t source_canceled_;
|
| -
|
| // The size of the two message buffers below.
|
| const mach_msg_size_t buffer_size_;
|
|
|
| @@ -70,6 +62,9 @@ class MachMessageServer : public MessageServer {
|
| base::mac::ScopedMachVM request_buffer_;
|
| base::mac::ScopedMachVM reply_buffer_;
|
|
|
| + // MACH_RECV dispatch source that handles the |server_port_|.
|
| + scoped_ptr<DispatchSourceMach> dispatch_source_;
|
| +
|
| // Whether or not ForwardMessage() was called during ReceiveMessage().
|
| bool did_forward_message_;
|
| };
|
|
|