Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: ipc/brokerable_attachment.h

Issue 2504063002: Revert of Remove IPC::BrokerableAttachment. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/BUILD.gn ('k') | ipc/brokerable_attachment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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_BROKERABLE_ATTACHMENT_H_
6 #define IPC_BROKERABLE_ATTACHMENT_H_
7
8 #include <stddef.h>
9 #include <stdint.h>
10
11 #include <algorithm>
12
13 #include "base/macros.h"
14 #include "build/build_config.h"
15 #include "ipc/ipc_export.h"
16 #include "ipc/ipc_message_attachment.h"
17
18 namespace IPC {
19
20 // This subclass of MessageAttachment requires an AttachmentBroker to be
21 // attached to a Chrome IPC message.
22 class IPC_EXPORT BrokerableAttachment : public MessageAttachment {
23 public:
24 enum BrokerableType {
25 PLACEHOLDER,
26 WIN_HANDLE,
27 MACH_PORT,
28 };
29
30 // Whether the attachment still needs information from the broker before it
31 // can be used.
32 bool NeedsBrokering() const;
33
34 // Returns TYPE_BROKERABLE_ATTACHMENT
35 Type GetType() const override;
36
37 virtual BrokerableType GetBrokerableType() const = 0;
38
39 // MessageAttachment override.
40 #if defined(OS_POSIX)
41 base::PlatformFile TakePlatformFile() override;
42 #endif // OS_POSIX
43
44 protected:
45 BrokerableAttachment();
46 ~BrokerableAttachment() override;
47
48 private:
49 DISALLOW_COPY_AND_ASSIGN(BrokerableAttachment);
50 };
51
52 } // namespace IPC
53
54 #endif // IPC_BROKERABLE_ATTACHMENT_H_
OLDNEW
« no previous file with comments | « ipc/BUILD.gn ('k') | ipc/brokerable_attachment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698