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

Unified Diff: blimp/net/blimp_message_dispatcher.h

Issue 1429193002: Add interfaces for most major Blimp net components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address wez's feedback. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: blimp/net/blimp_message_dispatcher.h
diff --git a/blimp/net/blimp_message_dispatcher.h b/blimp/net/blimp_message_dispatcher.h
deleted file mode 100644
index bf12449df16c8931056a67060abdba45ba3570f8..0000000000000000000000000000000000000000
--- a/blimp/net/blimp_message_dispatcher.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BLIMP_NET_BLIMP_MESSAGE_DISPATCHER_H_
-#define BLIMP_NET_BLIMP_MESSAGE_DISPATCHER_H_
-
-#include <map>
-
-#include "base/containers/small_map.h"
-#include "base/threading/thread_checker.h"
-#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/net/blimp_message_receiver.h"
-#include "blimp/net/blimp_net_export.h"
-
-namespace blimp {
-
-// Multiplexing BlimpMessageReceiver which routes BlimpMessages to other
-// receivers based on the messages' feature type.
-class BLIMP_NET_EXPORT BlimpMessageDispatcher : public BlimpMessageReceiver {
- public:
- BlimpMessageDispatcher();
- ~BlimpMessageDispatcher() override;
-
- // Registers a message receiver which will process all messages
- // with of the specified |type|.
- // Only one handler may be added per type.
- //
- // |handler| must be valid when OnBlimpMessage() is called.
- void AddReceiver(BlimpMessage::Type type, BlimpMessageReceiver* handler);
-
- // BlimpMessageReceiver implementation.
- net::Error OnBlimpMessage(const BlimpMessage& message) override;
-
- private:
- base::SmallMap<std::map<BlimpMessage::Type, BlimpMessageReceiver*>>
- feature_receiver_map_;
-
- DISALLOW_COPY_AND_ASSIGN(BlimpMessageDispatcher);
-};
-
-} // namespace blimp
-
-#endif // BLIMP_NET_BLIMP_MESSAGE_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698