summaryrefslogtreecommitdiffstats
path: root/sync/js/js_event_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'sync/js/js_event_handler.h')
-rw-r--r--sync/js/js_event_handler.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/sync/js/js_event_handler.h b/sync/js/js_event_handler.h
new file mode 100644
index 0000000..ce15903
--- /dev/null
+++ b/sync/js/js_event_handler.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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 SYNC_JS_JS_EVENT_HANDLER_H_
+#define SYNC_JS_JS_EVENT_HANDLER_H_
+#pragma once
+
+// See README.js for design comments.
+
+#include <string>
+
+namespace browser_sync {
+
+class JsEventDetails;
+
+// An interface for objects that handle Javascript events (e.g.,
+// WebUIs).
+class JsEventHandler {
+ public:
+ virtual void HandleJsEvent(
+ const std::string& name, const JsEventDetails& details) = 0;
+
+ protected:
+ virtual ~JsEventHandler() {}
+};
+
+} // namespace browser_sync
+
+#endif // SYNC_JS_JS_EVENT_HANDLER_H_