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

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

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 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
« no previous file with comments | « blimp/net/fake_blimp_message_processor.cc ('k') | blimp/net/fake_pipe_manager.cc » ('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 2016 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_FAKE_PIPE_MANAGER_H_
6 #define BLIMP_NET_FAKE_PIPE_MANAGER_H_
7
8 #include <map>
9
10 #include "blimp/net/fake_blimp_message_processor.h"
11 #include "blimp/net/pipe_manager.h"
12
13 namespace blimp {
14
15 // Stores outgoing messages in memory, and allows incoming messages to be
16 // faked.
17 class BLIMP_NET_EXPORT FakePipeManager : public PipeManager {
18 public:
19 FakePipeManager();
20 ~FakePipeManager() override;
21
22 std::unique_ptr<BlimpMessageProcessor> RegisterFeature(
23 BlimpMessage::FeatureCase feature_case,
24 BlimpMessageProcessor* incoming_processor) override;
25
26 // Send a fake incoming message as though it arrived from the network.
27 void SendIncomingMessage(std::unique_ptr<BlimpMessage>);
28
29 // Access the outgoing message processor for a given feature in order to
30 // inspect sent messages.
31 FakeBlimpMessageProcessor* GetOutgoingMessageProcessor(
32 BlimpMessage::FeatureCase feature_case);
33
34 private:
35 std::map<BlimpMessage::FeatureCase, FakeBlimpMessageProcessor*>
36 outgoing_processors_;
37
38 std::map<BlimpMessage::FeatureCase, BlimpMessageProcessor*>
39 incoming_processors_;
40
41 DISALLOW_COPY_AND_ASSIGN(FakePipeManager);
42 };
43
44 } // namespace blimp
45
46 #endif // BLIMP_NET_FAKE_PIPE_MANAGER_H_
OLDNEW
« no previous file with comments | « blimp/net/fake_blimp_message_processor.cc ('k') | blimp/net/fake_pipe_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698