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

Side by Side Diff: ipc/ipc_platform_file_attachment.h

Issue 883093003: IPC::Message Refactoring: Move POSIX specific bits to PlatformFileAttachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Windows build error Created 5 years, 10 months 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/ipc_message_utils.cc ('k') | ipc/ipc_platform_file_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 (c) 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_IPC_PLATFORM_FILE_ATTACHMENT_H_
6 #define IPC_IPC_PLATFORM_FILE_ATTACHMENT_H_
7
8 #include "base/files/file.h"
9 #include "ipc/ipc_message_attachment.h"
10
11 namespace IPC {
12 namespace internal {
13
14 // A platform file that is sent over |Channel| as a part of |Message|.
15 // |PlatformFileAttachment| doesn't own |file_|. The lifecycle of |file_| is
16 // managed by |MessageAttachmentSet|.
17 class PlatformFileAttachment : public MessageAttachment {
18 public:
19 explicit PlatformFileAttachment(base::PlatformFile file);
20
21 Type GetType() const override;
22 base::PlatformFile file() const { return file_; }
23
24 private:
25 ~PlatformFileAttachment() override;
26
27 base::PlatformFile file_;
28 };
29
30 base::PlatformFile GetPlatformFile(scoped_refptr<MessageAttachment> attachment);
31
32 } // namespace internal
33 } // namespace IPC
34
35 #endif // IPC_IPC_PLATFORM_FILE_ATTACHMENT_H_
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | ipc/ipc_platform_file_attachment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698