Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_MESSAGE_ATTACHMENT_H_ | |
| 6 #define IPC_IPC_MESSAGE_ATTACHMENT_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "ipc/ipc_export.h" | |
| 10 | |
| 11 namespace IPC { | |
| 12 | |
| 13 // An auxiliary data sent with |Message|. This can be a platform file descriptor | |
|
agl
2015/01/15 03:00:53
// Auxiliary data …
("data" is self-plural.)
Hajime Morrita
2015/01/23 00:29:05
Done.
| |
| 14 // or a mojo |MessagePipe|. |GetType()| returns the type of the subclass. | |
| 15 class IPC_EXPORT MessageAttachment | |
| 16 : public base::RefCounted<MessageAttachment> { | |
| 17 public: | |
| 18 enum Type { | |
| 19 TYPE_PLATFORM_FILE, // The instance is |PlatformFileAttachment|. | |
| 20 TYPE_MOJO_MESSAGE_PIPE // The instance is a mojo-based class. | |
|
agl
2015/01/15 03:00:53
comma at the end
Hajime Morrita
2015/01/23 00:29:05
Done.
| |
| 21 }; | |
| 22 | |
| 23 MessageAttachment(); | |
|
agl
2015/01/15 03:00:53
Why have this empty constructor? (Chromium even al
Hajime Morrita
2015/01/23 00:29:05
I was confused with some other chromium-specific r
| |
| 24 virtual Type GetType() const = 0; | |
| 25 | |
| 26 protected: | |
| 27 friend class base::RefCounted<MessageAttachment>; | |
| 28 virtual ~MessageAttachment(); | |
| 29 }; | |
| 30 | |
| 31 } // namespace IPC | |
| 32 | |
| 33 #endif // IPC_IPC_MESSAGE_ATTACHMENT_H_ | |
| OLD | NEW |