blob: 2e37dc1ed197ed0bd870955a33dff6dbe2ef9a6d [file] [log] [blame]
erikchen484c00842015-07-28 23:25:441// 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
avi246998d82015-12-22 02:39:048#include "base/macros.h"
erikchen484c00842015-07-28 23:25:449#include "ipc/attachment_broker_unprivileged.h"
10#include "ipc/handle_attachment_win.h"
11#include "ipc/ipc_export.h"
12
13namespace IPC {
14
15class BrokerableAttachment;
16
17// This class is an implementation of AttachmentBroker for the Windows platform
18// for non-privileged processes.
19class IPC_EXPORT AttachmentBrokerUnprivilegedWin
20 : public IPC::AttachmentBrokerUnprivileged {
21 public:
22 AttachmentBrokerUnprivilegedWin();
23 ~AttachmentBrokerUnprivilegedWin() override;
24
25 // IPC::AttachmentBroker overrides.
erikchena03dde6f2015-10-29 22:37:0426 bool SendAttachmentToProcess(
27 const scoped_refptr<BrokerableAttachment>& attachment,
28 base::ProcessId destination_process) override;
erikchen484c00842015-07-28 23:25:4429
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_