Update V8 to version 4.6.61.
[chromium-blink-merge.git] / ipc / attachment_broker_unprivileged.h
blob96d3d3e3dfd4e724e43592ac503cd691d7e770fd
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_UNPRIVILEGED_H_
6 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
8 #include "ipc/attachment_broker.h"
9 #include "ipc/ipc_export.h"
11 namespace IPC {
13 class Channel;
14 class ChannelProxy;
15 class Sender;
17 // This abstract subclass of AttachmentBroker is intended for use in
18 // non-privileged processes.
19 class IPC_EXPORT AttachmentBrokerUnprivileged : public IPC::AttachmentBroker {
20 public:
21 AttachmentBrokerUnprivileged();
22 ~AttachmentBrokerUnprivileged() override;
24 // In each unprivileged process, exactly one channel should be used to
25 // communicate brokerable attachments with the broker process.
26 void DesignateBrokerCommunicationChannel(IPC::Channel* channel);
27 void DesignateBrokerCommunicationChannel(IPC::ChannelProxy* proxy);
29 protected:
30 IPC::Sender* get_sender() { return sender_; }
32 private:
33 // |sender_| is used to send Messages to the privileged broker process.
34 // |sender_| must live at least as long as this instance.
35 IPC::Sender* sender_;
36 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivileged);
39 } // namespace IPC
41 #endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_