Avi Drissman | ea1be23 | 2022-09-14 23:29:06 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 57319ce | 2012-06-11 22:35:26 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef IPC_IPC_SENDER_H_ | ||||
6 | #define IPC_IPC_SENDER_H_ | ||||
7 | |||||
Ken Rockot | 3044d21 | 2018-01-23 02:44:39 | [diff] [blame] | 8 | #include "base/component_export.h" |
[email protected] | 57319ce | 2012-06-11 22:35:26 | [diff] [blame] | 9 | |
10 | namespace IPC { | ||||
11 | |||||
12 | class Message; | ||||
13 | |||||
Ken Rockot | 3044d21 | 2018-01-23 02:44:39 | [diff] [blame] | 14 | class COMPONENT_EXPORT(IPC) Sender { |
[email protected] | 57319ce | 2012-06-11 22:35:26 | [diff] [blame] | 15 | public: |
[email protected] | 57319ce | 2012-06-11 22:35:26 | [diff] [blame] | 16 | // Sends the given IPC message. The implementor takes ownership of the |
17 | // given Message regardless of whether or not this method succeeds. This | ||||
18 | // is done to make this method easier to use. Returns true on success and | ||||
19 | // false otherwise. | ||||
20 | virtual bool Send(Message* msg) = 0; | ||||
[email protected] | 95bbcc7 | 2012-07-11 00:07:54 | [diff] [blame] | 21 | |
22 | protected: | ||||
23 | virtual ~Sender() {} | ||||
[email protected] | 57319ce | 2012-06-11 22:35:26 | [diff] [blame] | 24 | }; |
25 | |||||
26 | } // namespace IPC | ||||
27 | |||||
28 | #endif // IPC_IPC_SENDER_H_ |