[email protected] | aa166d0 | 2012-12-11 23:47:42 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors. All rights reserved. |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | c1c32c8 | 2012-03-15 09:35:42 | [diff] [blame] | 5 | #ifndef SYNC_JS_JS_EVENT_HANDLER_H_ |
6 | #define SYNC_JS_JS_EVENT_HANDLER_H_ | ||||
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 7 | |
8 | // See README.js for design comments. | ||||
9 | |||||
10 | #include <string> | ||||
11 | |||||
[email protected] | aa166d0 | 2012-12-11 23:47:42 | [diff] [blame] | 12 | #include "sync/base/sync_export.h" |
13 | |||||
[email protected] | 65f17355 | 2012-06-28 22:43:58 | [diff] [blame] | 14 | namespace syncer { |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 15 | |
[email protected] | ec5263a | 2011-05-10 09:23:39 | [diff] [blame] | 16 | class JsEventDetails; |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 17 | |
18 | // An interface for objects that handle Javascript events (e.g., | ||||
19 | // WebUIs). | ||||
[email protected] | aa166d0 | 2012-12-11 23:47:42 | [diff] [blame] | 20 | class SYNC_EXPORT JsEventHandler { |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 21 | public: |
22 | virtual void HandleJsEvent( | ||||
[email protected] | ec5263a | 2011-05-10 09:23:39 | [diff] [blame] | 23 | const std::string& name, const JsEventDetails& details) = 0; |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 24 | |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 25 | protected: |
26 | virtual ~JsEventHandler() {} | ||||
27 | }; | ||||
28 | |||||
[email protected] | 65f17355 | 2012-06-28 22:43:58 | [diff] [blame] | 29 | } // namespace syncer |
[email protected] | f92351d | 2011-02-01 07:42:12 | [diff] [blame] | 30 | |
[email protected] | c1c32c8 | 2012-03-15 09:35:42 | [diff] [blame] | 31 | #endif // SYNC_JS_JS_EVENT_HANDLER_H_ |