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

Unified Diff: ipc/ipc_message.h

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). Created 7 years, 1 month 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 | « ipc/ipc_logging.cc ('k') | ipc/ipc_message.cc » ('j') | 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 c07170343d6a19351d674bc00a1f18cff42b98bd..42090166b38a9d9af94db565fc419bc0fb3e9949 100644
--- a/ipc/ipc_message.h
+++ b/ipc/ipc_message.h
@@ -34,11 +34,17 @@ struct LogData;
class IPC_EXPORT Message : public Pickle {
public:
+ enum PriorityValue {
+ PRIORITY_LOW = 1,
+ PRIORITY_NORMAL,
+ PRIORITY_HIGH
+ };
+
// Bit values used in the flags field.
// Upper 24 bits of flags store a reference number, so this enum is limited to
// 8 bits.
enum {
- UNUSED = 0x03, // Low 2 bits are not used.
+ PRIORITY_MASK = 0x03, // Low 2 bits of store the priority value.
SYNC_BIT = 0x04,
REPLY_BIT = 0x08,
REPLY_ERROR_BIT = 0x10,
@@ -51,17 +57,22 @@ class IPC_EXPORT Message : public Pickle {
Message();
- // Initialize a message with routing ID and a user-defined type.
- Message(int32 routing_id, uint32 type);
+ // Initialize a message with a user-defined type, priority value, and
+ // destination WebView ID.
+ Message(int32 routing_id, uint32 type, PriorityValue priority);
// Initializes a message from a const block of data. The data is not copied;
// instead the data is merely referenced by this message. Only const methods
// should be used on the message when initialized this way.
- Message(const char* data, size_t data_len);
+ Message(const char* data, int data_len);
Message(const Message& other);
Message& operator=(const Message& other);
+ PriorityValue priority() const {
+ return static_cast<PriorityValue>(header()->flags & PRIORITY_MASK);
+ }
+
// True if this is a synchronous message.
void set_sync() {
header()->flags |= SYNC_BIT;
« no previous file with comments | « ipc/ipc_logging.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698