d783850bdff249701af025f345ac58d08cb55bd2
[platform/framework/web/crosswalk.git] / src / xwalk / application / browser / event_observer.h
1 // Copyright (c) 2013 Intel Corporation. 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.
4
5 #ifndef XWALK_APPLICATION_BROWSER_EVENT_OBSERVER_H_
6 #define XWALK_APPLICATION_BROWSER_EVENT_OBSERVER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h"
12
13 namespace xwalk {
14 namespace application {
15
16 class ApplicationEventManager;
17 class Event;
18
19 // Abstract base class to observe application events.
20 class EventObserver {
21  public:
22   explicit EventObserver(ApplicationEventManager* event_namager);
23
24   virtual void Observe(const std::string& app_id,
25                        scoped_refptr<Event> event) = 0;
26
27   virtual ~EventObserver();
28
29  protected:
30   ApplicationEventManager* event_manager_;
31 };
32
33 }  // namespace application
34 }  // namespace xwalk
35 #endif  // XWALK_APPLICATION_BROWSER_EVENT_OBSERVER_H_