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

Side by Side Diff: ipc/ipc_listener.h

Issue 10541065: Separate out IPC::Message::Sender and channel::Listener into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: de-inline Created 8 years, 6 months 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_fuzzing_tests.cc ('k') | ipc/ipc_logging.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IPC_IPC_LISTENER_H_
6 #define IPC_IPC_LISTENER_H_
7
8 #include "base/basictypes.h"
9 #include "build/build_config.h"
10 #include "ipc/ipc_export.h"
11
12 namespace IPC {
13
14 class Message;
15
16 // Implemented by consumers of a Channel to receive messages.
17 class IPC_EXPORT Listener {
18 public:
19 virtual ~Listener() {}
20
21 // Called when a message is received. Returns true iff the message was
22 // handled.
23 virtual bool OnMessageReceived(const Message& message) = 0;
24
25 // Called when the channel is connected and we have received the internal
26 // Hello message from the peer.
27 virtual void OnChannelConnected(int32 peer_pid) {}
28
29 // Called when an error is detected that causes the channel to close.
30 // This method is not called when a channel is closed normally.
31 virtual void OnChannelError() {}
32
33 #if defined(OS_POSIX)
34 // Called on the server side when a channel that listens for connections
35 // denies an attempt to connect.
36 virtual void OnChannelDenied() {}
37
38 // Called on the server side when a channel that listens for connections
39 // has an error that causes the listening channel to close.
40 virtual void OnChannelListenError() {}
41 #endif // OS_POSIX
42 };
43
44 } // namespace IPC
45
46 #endif // IPC_IPC_LISTENER_H_
OLDNEW
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698