OLD | NEW |
(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 "ipc/ipc_export.h" |
| 9 #include "ipc/ipc_message_attachment.h" |
| 10 |
| 11 namespace IPC { |
| 12 |
| 13 // An id uniquely identifies an attachment sent via a broker. |
| 14 struct IPC_EXPORT BrokerableAttachmentId { |
| 15 uint32_t nonce[4]; |
| 16 }; |
| 17 |
| 18 namespace internal { |
| 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 BrokerableAttachment() {} |
| 25 |
| 26 // The identifier is unique across all Chrome processes. |
| 27 BrokerableAttachmentId GetIdentifier() { return id_; } |
| 28 |
| 29 protected: |
| 30 ~BrokerableAttachment() override{}; |
| 31 |
| 32 private: |
| 33 // This member uniquely identifier a BrokerableAttachment across all |
| 34 // processes. |
| 35 BrokerableAttachmentId id_; |
| 36 }; |
| 37 |
| 38 } // namespace internal |
| 39 } // namespace IPC |
| 40 |
| 41 #endif // IPC_BROKERABLE_ATTACHMENT_H_ |
OLD | NEW |