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

Unified Diff: ipc/ipc_message.h

Issue 9863005: Initial implementation of an IPC adapter to expose Chrome IPC to Native Client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/nacl/nacl_ipc_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message.h
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index 2598c8cbc39afda80137a31d01fae2ff7dc32fc9..2c85e42ab75877f1a558624a967ce24ee36d96b3 100644
--- a/ipc/ipc_message.h
+++ b/ipc/ipc_message.h
@@ -57,6 +57,17 @@ class IPC_EXPORT Message : public Pickle {
PRIORITY_HIGH
};
+ // Bit values used in the flags field.
+ enum {
+ PRIORITY_MASK = 0x0003, // Low 2 bits of store the priority value.
+ SYNC_BIT = 0x0004,
+ REPLY_BIT = 0x0008,
+ REPLY_ERROR_BIT = 0x0010,
+ UNBLOCK_BIT = 0x0020,
+ PUMPING_MSGS_BIT = 0x0040,
+ HAS_SENT_TIME_BIT = 0x0080,
+ };
+
virtual ~Message();
Message();
@@ -78,6 +89,9 @@ class IPC_EXPORT Message : public Pickle {
}
// True if this is a synchronous message.
+ void set_sync() {
+ header()->flags |= SYNC_BIT;
+ }
bool is_sync() const {
return (header()->flags & SYNC_BIT) != 0;
}
@@ -134,6 +148,10 @@ class IPC_EXPORT Message : public Pickle {
header()->routing = new_id;
}
+ uint32 flags() const {
+ return header()->flags;
+ }
+
template<class T, class S>
static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)()) {
@@ -209,21 +227,6 @@ class IPC_EXPORT Message : public Pickle {
friend class MessageReplyDeserializer;
friend class SyncMessage;
- void set_sync() {
- header()->flags |= SYNC_BIT;
- }
-
- // flags
- enum {
- PRIORITY_MASK = 0x0003,
- SYNC_BIT = 0x0004,
- REPLY_BIT = 0x0008,
- REPLY_ERROR_BIT = 0x0010,
- UNBLOCK_BIT = 0x0020,
- PUMPING_MSGS_BIT= 0x0040,
- HAS_SENT_TIME_BIT = 0x0080,
- };
-
#pragma pack(push, 4)
struct Header : Pickle::Header {
int32 routing; // ID of the view that this message is destined for
« no previous file with comments | « chrome/nacl/nacl_ipc_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698