summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message.h
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 22:28:12 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 22:28:12 +0000
commit753bb25fc70b560fb3539e2b63843a193ccb295a (patch)
treed42966216756764b92d90162e993ab766c307dc7 /ipc/ipc_message.h
parent715e27238d32ba17d2c06acf37bca40bb0a180cb (diff)
downloadchromium_src-753bb25fc70b560fb3539e2b63843a193ccb295a.zip
chromium_src-753bb25fc70b560fb3539e2b63843a193ccb295a.tar.gz
chromium_src-753bb25fc70b560fb3539e2b63843a193ccb295a.tar.bz2
Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330
This is a speculative revert to see if it's the cause of hanging renderers. BUG=313112 Review URL: https://codereview.chromium.org/57783006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message.h')
-rw-r--r--ipc/ipc_message.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index c071703..4209016 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;