| 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_HANDLE_ATTACHMENT_WIN_H_ | 5 #ifndef IPC_HANDLE_ATTACHMENT_WIN_H_ |
| 6 #define IPC_HANDLE_ATTACHMENT_WIN_H_ | 6 #define IPC_HANDLE_ATTACHMENT_WIN_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // The permissions to use when duplicating the handle. | 33 // The permissions to use when duplicating the handle. |
| 34 HandleWin::Permissions permissions; | 34 HandleWin::Permissions permissions; |
| 35 AttachmentId attachment_id; | 35 AttachmentId attachment_id; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 HandleAttachmentWin(const HANDLE& handle, HandleWin::Permissions permissions); | 38 HandleAttachmentWin(const HANDLE& handle, HandleWin::Permissions permissions); |
| 39 explicit HandleAttachmentWin(const WireFormat& wire_format); | 39 explicit HandleAttachmentWin(const WireFormat& wire_format); |
| 40 explicit HandleAttachmentWin(const BrokerableAttachment::AttachmentId& id); | 40 explicit HandleAttachmentWin(const BrokerableAttachment::AttachmentId& id); |
| 41 | 41 |
| 42 BrokerableType GetBrokerableType() const override; | 42 BrokerableType GetBrokerableType() const override; |
| 43 void PopulateWithAttachment(const BrokerableAttachment* attachment) override; | |
| 44 | 43 |
| 45 // Returns the wire format of this attachment. | 44 // Returns the wire format of this attachment. |
| 46 WireFormat GetWireFormat(const base::ProcessId& destination) const; | 45 WireFormat GetWireFormat(const base::ProcessId& destination) const; |
| 47 | 46 |
| 48 HANDLE get_handle() const { return handle_; } | 47 HANDLE get_handle() const { return handle_; } |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 ~HandleAttachmentWin() override; | 50 ~HandleAttachmentWin() override; |
| 52 HANDLE handle_; | 51 HANDLE handle_; |
| 53 HandleWin::Permissions permissions_; | 52 HandleWin::Permissions permissions_; |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 } // namespace internal | 55 } // namespace internal |
| 57 } // namespace IPC | 56 } // namespace IPC |
| 58 | 57 |
| 59 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_ | 58 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_ |
| OLD | NEW |