Upstream version 7.35.136.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / browser / application_tizen.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 #ifndef XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_
5 #define XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_
6
7 #include "xwalk/application/browser/application.h"
8
9 #if defined(USE_OZONE)
10 #include "base/message_loop/message_pump_observer.h"
11 #endif
12
13 namespace xwalk {
14 namespace application {
15
16 class ApplicationTizen : //  NOLINT
17 #if defined(USE_OZONE)
18   public base::MessagePumpObserver,
19 #endif
20   public Application {
21  public:
22   virtual ~ApplicationTizen();
23   void Hide();
24
25  private:
26   // We enforce ApplicationService ownership.
27   friend class ApplicationService;
28   ApplicationTizen(scoped_refptr<ApplicationData> data,
29                    RuntimeContext* context,
30                    Application::Observer* observer);
31
32   virtual void InitSecurityPolicy() OVERRIDE;
33
34 #if defined(USE_OZONE)
35   virtual base::EventStatus WillProcessEvent(
36       const base::NativeEvent& event) OVERRIDE;
37   virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
38 #endif
39 };
40
41 inline ApplicationTizen* ToApplicationTizen(Application* app) {
42   return static_cast<ApplicationTizen*>(app);
43 }
44
45 }  // namespace application
46 }  // namespace xwalk
47
48 #endif  // XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_