erikchen | 484c0084 | 2015-07-28 23:25:44 | [diff] [blame] | 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. |
| 4 | |
| 5 | #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_ |
| 6 | #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_ |
| 7 | |
avi | 246998d8 | 2015-12-22 02:39:04 | [diff] [blame] | 8 | #include "base/macros.h" |
erikchen | 484c0084 | 2015-07-28 23:25:44 | [diff] [blame] | 9 | #include "ipc/attachment_broker_unprivileged.h" |
| 10 | #include "ipc/handle_attachment_win.h" |
| 11 | #include "ipc/ipc_export.h" |
| 12 | |
| 13 | namespace IPC { |
| 14 | |
| 15 | class BrokerableAttachment; |
| 16 | |
| 17 | // This class is an implementation of AttachmentBroker for the Windows platform |
| 18 | // for non-privileged processes. |
| 19 | class IPC_EXPORT AttachmentBrokerUnprivilegedWin |
| 20 | : public IPC::AttachmentBrokerUnprivileged { |
| 21 | public: |
| 22 | AttachmentBrokerUnprivilegedWin(); |
| 23 | ~AttachmentBrokerUnprivilegedWin() override; |
| 24 | |
| 25 | // IPC::AttachmentBroker overrides. |
erikchen | a03dde6f | 2015-10-29 22:37:04 | [diff] [blame] | 26 | bool SendAttachmentToProcess( |
| 27 | const scoped_refptr<BrokerableAttachment>& attachment, |
| 28 | base::ProcessId destination_process) override; |
erikchen | 484c0084 | 2015-07-28 23:25:44 | [diff] [blame] | 29 | |
| 30 | // IPC::Listener overrides. |
| 31 | bool OnMessageReceived(const Message& message) override; |
| 32 | |
| 33 | private: |
| 34 | // IPC message handlers. |
| 35 | void OnWinHandleHasBeenDuplicated( |
| 36 | const IPC::internal::HandleAttachmentWin::WireFormat& wire_format); |
| 37 | |
| 38 | DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivilegedWin); |
| 39 | }; |
| 40 | |
| 41 | } // namespace IPC |
| 42 | |
| 43 | #endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_ |