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

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

Issue 1933053003: Used oneof in blimp_message.proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added oneof to protocol_control.proto Created 4 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_ 5 #ifndef BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_
6 #define BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_ 6 #define BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 // BlimpMessageMultiplexer is created on the UI thread, and then used and 22 // BlimpMessageMultiplexer is created on the UI thread, and then used and
23 // destroyed on the IO thread. 23 // destroyed on the IO thread.
24 class BLIMP_NET_EXPORT BlimpMessageMultiplexer { 24 class BLIMP_NET_EXPORT BlimpMessageMultiplexer {
25 public: 25 public:
26 // |output_processor|: A pointer to the MessageProcessor that will receive the 26 // |output_processor|: A pointer to the MessageProcessor that will receive the
27 // multiplexed message stream. 27 // multiplexed message stream.
28 explicit BlimpMessageMultiplexer(BlimpMessageProcessor* output_processor); 28 explicit BlimpMessageMultiplexer(BlimpMessageProcessor* output_processor);
29 29
30 ~BlimpMessageMultiplexer(); 30 ~BlimpMessageMultiplexer();
31 31
32 // Creates a BlimpMessageProcessor object for sending messages of type |type|. 32 // Creates a BlimpMessageProcessor object for sending messages of type |type|.
Kevin M 2016/05/20 18:28:16 update documentation to reflect new naming
33 // Any number of senders can be created at a time for a given type. 33 // Any number of senders can be created at a time for a given type.
34 std::unique_ptr<BlimpMessageProcessor> CreateSenderForType( 34 std::unique_ptr<BlimpMessageProcessor> CreateSenderForType(
Kevin M 2016/05/20 18:28:16 The name "ForType" doesn't work anymore, since we
shaktisahu 2016/05/20 22:29:42 Done.
35 BlimpMessage::Type type); 35 BlimpMessage::FeatureCase feature_case);
36 36
37 private: 37 private:
38 base::WeakPtrFactory<BlimpMessageProcessor> output_weak_factory_; 38 base::WeakPtrFactory<BlimpMessageProcessor> output_weak_factory_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(BlimpMessageMultiplexer); 40 DISALLOW_COPY_AND_ASSIGN(BlimpMessageMultiplexer);
41 }; 41 };
42 42
43 } // namespace blimp 43 } // namespace blimp
44 44
45 #endif // BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_ 45 #endif // BLIMP_NET_BLIMP_MESSAGE_MULTIPLEXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698