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

Unified Diff: headless/public/internal/message_dispatcher.h

Issue 2783983002: Cleanup headless templates and message_dispatcher.h. (Closed)
Patch Set: build fix Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/public/domains/types_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/internal/message_dispatcher.h
diff --git a/headless/public/internal/message_dispatcher.h b/headless/public/internal/message_dispatcher.h
index ea939782b84df8766424a7fb62e2e7f71258bebf..6643213d94aa0490a502e898b07bea324872158a 100644
--- a/headless/public/internal/message_dispatcher.h
+++ b/headless/public/internal/message_dispatcher.h
@@ -5,6 +5,14 @@
#ifndef HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_
#define HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_
+#include <memory>
+
+#include "base/callback_forward.h"
+
+namespace base {
+class Value;
+}
+
namespace headless {
namespace internal {
@@ -17,16 +25,14 @@ class MessageDispatcher {
base::Callback<void(const base::Value&)> callback) = 0;
virtual void SendMessage(const char* method,
std::unique_ptr<base::Value> params,
- base::Callback<void()> callback) = 0;
- virtual void SendMessage(
- const char* method,
- base::Callback<void(const base::Value&)> callback) = 0;
- virtual void SendMessage(const char* method,
- base::Callback<void()> callback) = 0;
+ base::Closure callback) = 0;
virtual void RegisterEventHandler(
const char* method,
base::Callback<void(const base::Value&)> callback) = 0;
+
+ protected:
+ virtual ~MessageDispatcher() {}
};
} // namespace internal
« no previous file with comments | « headless/public/domains/types_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698