OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_IPC_MESSAGE_H__ | 5 #ifndef CHROME_COMMON_IPC_MESSAGE_H__ |
6 #define CHROME_COMMON_IPC_MESSAGE_H__ | 6 #define CHROME_COMMON_IPC_MESSAGE_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class Channel; | 22 class Channel; |
23 class Message; | 23 class Message; |
24 struct LogData; | 24 struct LogData; |
25 | 25 |
26 class Message : public Pickle { | 26 class Message : public Pickle { |
27 public: | 27 public: |
28 // Implemented by objects that can send IPC messages across a channel. | 28 // Implemented by objects that can send IPC messages across a channel. |
29 class Sender { | 29 class Sender { |
30 public: | 30 public: |
| 31 virtual ~Sender() {} |
| 32 |
31 // Sends the given IPC message. The implementor takes ownership of the | 33 // Sends the given IPC message. The implementor takes ownership of the |
32 // given Message regardless of whether or not this method succeeds. This | 34 // given Message regardless of whether or not this method succeeds. This |
33 // is done to make this method easier to use. Returns true on success and | 35 // is done to make this method easier to use. Returns true on success and |
34 // false otherwise. | 36 // false otherwise. |
35 virtual bool Send(Message* msg) = 0; | 37 virtual bool Send(Message* msg) = 0; |
36 }; | 38 }; |
37 | 39 |
38 enum PriorityValue { | 40 enum PriorityValue { |
39 PRIORITY_LOW = 1, | 41 PRIORITY_LOW = 1, |
40 PRIORITY_NORMAL, | 42 PRIORITY_NORMAL, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 232 |
231 // indicates a general message not sent to a particular tab. | 233 // indicates a general message not sent to a particular tab. |
232 MSG_ROUTING_CONTROL = kint32max, | 234 MSG_ROUTING_CONTROL = kint32max, |
233 }; | 235 }; |
234 | 236 |
235 #define IPC_REPLY_ID 0xFFF0 // Special message id for replies | 237 #define IPC_REPLY_ID 0xFFF0 // Special message id for replies |
236 #define IPC_LOGGING_ID 0xFFF1 // Special message id for logging | 238 #define IPC_LOGGING_ID 0xFFF1 // Special message id for logging |
237 | 239 |
238 #endif // CHROME_COMMON_IPC_MESSAGE_H__ | 240 #endif // CHROME_COMMON_IPC_MESSAGE_H__ |
239 | 241 |
OLD | NEW |