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
3 // found in the LICENSE file.
5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
8 #include "ipc/attachment_broker_privileged.h"
9 #include "ipc/handle_attachment_win.h"
10 #include "ipc/ipc_export.h"
14 // This class is a concrete subclass of AttachmentBrokerPrivileged for the
16 class IPC_EXPORT AttachmentBrokerPrivilegedWin
17 : public AttachmentBrokerPrivileged
{
19 AttachmentBrokerPrivilegedWin();
20 ~AttachmentBrokerPrivilegedWin() override
;
22 // IPC::AttachmentBroker overrides.
23 bool SendAttachmentToProcess(const BrokerableAttachment
* attachment
,
24 base::ProcessId destination_process
) override
;
26 // IPC::Listener overrides.
27 bool OnMessageReceived(const Message
& message
) override
;
30 using HandleWireFormat
= internal::HandleAttachmentWin::WireFormat
;
31 // IPC message handlers.
32 void OnDuplicateWinHandle(const Message
& message
);
34 // Duplicates |wire_Format| from |source_process| into its destination
36 HandleWireFormat
DuplicateWinHandle(const HandleWireFormat
& wire_format
,
37 base::ProcessId source_process
);
39 // If the HANDLE's destination is this process, queue it and notify the
40 // observers. Otherwise, send it in an IPC to its destination.
41 void RouteDuplicatedHandle(const HandleWireFormat
& wire_format
);
43 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedWin
);
48 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_