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