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

Side by Side Diff: ipc/attachment_broker_privileged_mac.h

Issue 1420763002: ipc: Move methods into AttachmentBroker interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 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 | « ipc/attachment_broker_privileged.h ('k') | ipc/attachment_broker_privileged_mac.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ 5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_
6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ 6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_
7 7
8 #include <mach/mach.h> 8 #include <mach/mach.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // the creation of R may not be necessary. 43 // the creation of R may not be necessary.
44 // 44 //
45 // For the rest of this file, and the corresponding implementation file, R will 45 // For the rest of this file, and the corresponding implementation file, R will
46 // be called the "intermediate Mach port" and M3 the "final Mach port". 46 // be called the "intermediate Mach port" and M3 the "final Mach port".
47 class IPC_EXPORT AttachmentBrokerPrivilegedMac 47 class IPC_EXPORT AttachmentBrokerPrivilegedMac
48 : public AttachmentBrokerPrivileged { 48 : public AttachmentBrokerPrivileged {
49 public: 49 public:
50 AttachmentBrokerPrivilegedMac(); 50 AttachmentBrokerPrivilegedMac();
51 ~AttachmentBrokerPrivilegedMac() override; 51 ~AttachmentBrokerPrivilegedMac() override;
52 52
53 // The port provider must live as long as the AttachmentBrokerPrivilegedMac. A
54 // port provider must be set before any attachment brokering occurs.
55 void SetPortProvider(base::PortProvider* port_provider);
56
57 // IPC::AttachmentBroker overrides. 53 // IPC::AttachmentBroker overrides.
58 bool SendAttachmentToProcess(BrokerableAttachment* attachment, 54 bool SendAttachmentToProcess(BrokerableAttachment* attachment,
59 base::ProcessId destination_process) override; 55 base::ProcessId destination_process) override;
60 56
61 // IPC::Listener overrides. 57 // IPC::Listener overrides.
62 bool OnMessageReceived(const Message& message) override; 58 bool OnMessageReceived(const Message& message) override;
63 59
64 private: 60 private:
65 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest, 61 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest,
66 InsertRight); 62 InsertRight);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // passed to the consumer of the Chrome IPC message. 111 // passed to the consumer of the Chrome IPC message.
116 // Makes an attachment, queues it, and notifies the observers. 112 // Makes an attachment, queues it, and notifies the observers.
117 void RouteWireFormatToSelf(const MachPortWireFormat& wire_format); 113 void RouteWireFormatToSelf(const MachPortWireFormat& wire_format);
118 114
119 // |wire_format.destination_process| must be another process. 115 // |wire_format.destination_process| must be another process.
120 // |wire_format.mach_port| must be the intermediate Mach port. 116 // |wire_format.mach_port| must be the intermediate Mach port.
121 // Ownership of |wire_format.mach_port| is implicitly passed to the process 117 // Ownership of |wire_format.mach_port| is implicitly passed to the process
122 // that receives the Chrome IPC message. 118 // that receives the Chrome IPC message.
123 void RouteWireFormatToAnother(const MachPortWireFormat& wire_format); 119 void RouteWireFormatToAnother(const MachPortWireFormat& wire_format);
124 120
125 base::PortProvider* port_provider_;
126
127 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedMac); 121 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedMac);
128 }; 122 };
129 123
130 } // namespace IPC 124 } // namespace IPC
131 125
132 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ 126 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_privileged.h ('k') | ipc/attachment_broker_privileged_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698