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

Side by Side Diff: ipc/ipc_message.h

Issue 35643005: Remove unused IPC::Message priority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_logging.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_MESSAGE_H_ 5 #ifndef IPC_IPC_MESSAGE_H_
6 #define IPC_IPC_MESSAGE_H_ 6 #define IPC_IPC_MESSAGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 class FileDescriptorSet; 27 class FileDescriptorSet;
28 28
29 namespace IPC { 29 namespace IPC {
30 30
31 //------------------------------------------------------------------------------ 31 //------------------------------------------------------------------------------
32 32
33 struct LogData; 33 struct LogData;
34 34
35 class IPC_EXPORT Message : public Pickle { 35 class IPC_EXPORT Message : public Pickle {
36 public: 36 public:
37 enum PriorityValue {
38 PRIORITY_LOW = 1,
39 PRIORITY_NORMAL,
40 PRIORITY_HIGH
41 };
42
43 // Bit values used in the flags field. 37 // Bit values used in the flags field.
44 // Upper 24 bits of flags store a reference number, so this enum is limited to 38 // Upper 24 bits of flags store a reference number, so this enum is limited to
45 // 8 bits. 39 // 8 bits.
46 enum { 40 enum {
47 PRIORITY_MASK = 0x03, // Low 2 bits of store the priority value. 41 UNUSED = 0x03, // Low 2 bits are not used.
48 SYNC_BIT = 0x04, 42 SYNC_BIT = 0x04,
49 REPLY_BIT = 0x08, 43 REPLY_BIT = 0x08,
50 REPLY_ERROR_BIT = 0x10, 44 REPLY_ERROR_BIT = 0x10,
51 UNBLOCK_BIT = 0x20, 45 UNBLOCK_BIT = 0x20,
52 PUMPING_MSGS_BIT = 0x40, 46 PUMPING_MSGS_BIT = 0x40,
53 HAS_SENT_TIME_BIT = 0x80, 47 HAS_SENT_TIME_BIT = 0x80,
54 }; 48 };
55 49
56 virtual ~Message(); 50 virtual ~Message();
57 51
58 Message(); 52 Message();
59 53
60 // Initialize a message with a user-defined type, priority value, and 54 // Initialize a message with routing ID and a user-defined type.
61 // destination WebView ID. 55 Message(int32 routing_id, uint32 type);
62 Message(int32 routing_id, uint32 type, PriorityValue priority);
63 56
64 // Initializes a message from a const block of data. The data is not copied; 57 // Initializes a message from a const block of data. The data is not copied;
65 // instead the data is merely referenced by this message. Only const methods 58 // instead the data is merely referenced by this message. Only const methods
66 // should be used on the message when initialized this way. 59 // should be used on the message when initialized this way.
67 Message(const char* data, int data_len); 60 Message(const char* data, size_t data_len);
68 61
69 Message(const Message& other); 62 Message(const Message& other);
70 Message& operator=(const Message& other); 63 Message& operator=(const Message& other);
71 64
72 PriorityValue priority() const {
73 return static_cast<PriorityValue>(header()->flags & PRIORITY_MASK);
74 }
75
76 // True if this is a synchronous message. 65 // True if this is a synchronous message.
77 void set_sync() { 66 void set_sync() {
78 header()->flags |= SYNC_BIT; 67 header()->flags |= SYNC_BIT;
79 } 68 }
80 bool is_sync() const { 69 bool is_sync() const {
81 return (header()->flags & SYNC_BIT) != 0; 70 return (header()->flags & SYNC_BIT) != 0;
82 } 71 }
83 72
84 // Set this on a reply to a synchronous message. 73 // Set this on a reply to a synchronous message.
85 void set_reply() { 74 void set_reply() {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 MSG_ROUTING_NONE = -2, 273 MSG_ROUTING_NONE = -2,
285 274
286 // indicates a general message not sent to a particular tab. 275 // indicates a general message not sent to a particular tab.
287 MSG_ROUTING_CONTROL = kint32max, 276 MSG_ROUTING_CONTROL = kint32max,
288 }; 277 };
289 278
290 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies 279 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies
291 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging 280 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging
292 281
293 #endif // IPC_IPC_MESSAGE_H_ 282 #endif // IPC_IPC_MESSAGE_H_
OLDNEW
« 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