Index: webrtc/base/messagehandler.h |
diff --git a/webrtc/base/messagehandler.h b/webrtc/base/messagehandler.h |
index 72c0dc6907950a8e0645f1172f7db9a503b16874..943d0d7d9b0d9f6e2d60e9becd9d8fd3bbe3768f 100644 |
--- a/webrtc/base/messagehandler.h |
+++ b/webrtc/base/messagehandler.h |
@@ -11,65 +11,9 @@ |
#ifndef WEBRTC_BASE_MESSAGEHANDLER_H_ |
#define WEBRTC_BASE_MESSAGEHANDLER_H_ |
-#include <memory> |
-#include <utility> |
-#include "webrtc/base/constructormagic.h" |
- |
-namespace rtc { |
- |
-struct Message; |
- |
-// Messages get dispatched to a MessageHandler |
- |
-class MessageHandler { |
- public: |
- virtual ~MessageHandler(); |
- virtual void OnMessage(Message* msg) = 0; |
- |
- protected: |
- MessageHandler() {} |
- |
- private: |
- RTC_DISALLOW_COPY_AND_ASSIGN(MessageHandler); |
-}; |
- |
-// Helper class to facilitate executing a functor on a thread. |
-template <class ReturnT, class FunctorT> |
-class FunctorMessageHandler : public MessageHandler { |
- public: |
- explicit FunctorMessageHandler(const FunctorT& functor) |
- : functor_(functor) {} |
- virtual void OnMessage(Message* msg) { |
- result_ = functor_(); |
- } |
- const ReturnT& result() const { return result_; } |
- |
- // Returns moved result. Should not call result() or MoveResult() again |
- // after this. |
- ReturnT MoveResult() { return std::move(result_); } |
- |
- private: |
- FunctorT functor_; |
- ReturnT result_; |
-}; |
- |
-// Specialization for ReturnT of void. |
-template <class FunctorT> |
-class FunctorMessageHandler<void, FunctorT> : public MessageHandler { |
- public: |
- explicit FunctorMessageHandler(const FunctorT& functor) |
- : functor_(functor) {} |
- virtual void OnMessage(Message* msg) { |
- functor_(); |
- } |
- void result() const {} |
- void MoveResult() {} |
- |
- private: |
- FunctorT functor_; |
-}; |
- |
-} // namespace rtc |
+// This header is deprecated and is just left here temporarily during |
+// refactoring. See https://bugs.webrtc.org/7634 for more details. |
+#include "webrtc/rtc_base/messagehandler.h" |
#endif // WEBRTC_BASE_MESSAGEHANDLER_H_ |