Print Preview: Changing displayed error message when PDF Viewer is missing.
[chromium-blink-merge.git] / chrome / browser / sync / js_event_router.h
blob89839ab827998ec2cd884259522b19111abc3067
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_JS_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_SYNC_JS_EVENT_ROUTER_H_
7 #pragma once
9 // See README.js for design comments.
11 #include <string>
13 namespace browser_sync {
15 class JsArgList;
16 class JsEventDetails;
17 class JsEventHandler;
19 // An interface for objects that don't directly handle Javascript
20 // events but can pass them to JsEventHandlers or route them to other
21 // JsEventRouters.
22 class JsEventRouter {
23 public:
24 virtual void RouteJsEvent(
25 const std::string& name, const JsEventDetails& details) = 0;
27 // |target| is const because it shouldn't be used except by the
28 // router that directly knows about it (which can then safely cast
29 // away the constness).
30 virtual void RouteJsMessageReply(
31 const std::string& name, const JsArgList& args,
32 const JsEventHandler* target) = 0;
34 protected:
35 virtual ~JsEventRouter() {}
38 } // namespace browser_sync
40 #endif // CHROME_BROWSER_SYNC_JS_EVENT_ROUTER_H_