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

Side by Side Diff: blimp/net/blimp_message_receiver.h

Issue 1324263003: Blimp: create MessageDispatcher class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp-protos
Patch Set: Addressed wez's feedback. Created 5 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2015 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 BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_
6 #define BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_
7
8 namespace blimp {
9
10 class BlimpMessage;
11
12 // Abstract interface for classes that can receive BlimpMessages.
Wez 2015/10/09 23:15:34 nit: I can see it's abstract; suggest just "Interf
Kevin M 2015/10/10 00:42:34 Done.
13 class BlimpMessageReceiver {
14 public:
15 virtual ~BlimpMessageReceiver() {}
16
17 // Receives |message| for processing.
18 // The handler is responsible for routing the call through the appropriate
19 // thread.
20 // Method will return false if |message| is invalid, which should cause the
21 // connection to be terminated.
Wez 2015/10/09 23:15:35 nit: Make clear that the caller needs to terminate
Kevin M 2015/10/10 00:42:34 Done.
22 virtual bool OnMessage(const BlimpMessage& message) = 0;
Wez 2015/10/09 23:15:34 nit: OnBlimpMessage, for consistency, and 'cos OnM
Kevin M 2015/10/10 00:42:34 Done.
23 };
24
25 } // namespace blimp
26
27 #endif // BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698