Upstream version 9.38.204.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 "base/event_types.h"
8 #include "xwalk/application/browser/application.h"
9
10 #if defined(USE_OZONE)
11 #include "ui/events/platform/platform_event_observer.h"
12 #include "ui/events/platform/platform_event_types.h"
13 #endif
14
15 namespace xwalk {
16 namespace application {
17
18 class ApplicationTizen :  // NOLINT
19 #if defined(USE_OZONE)
20   public ui::PlatformEventObserver,
21 #endif
22   public Application {
23  public:
24   virtual ~ApplicationTizen();
25   void Hide();
26   void Suspend();
27   void Resume();
28
29  private:
30   friend class Application;
31   ApplicationTizen(scoped_refptr<ApplicationData> data,
32                    RuntimeContext* context);
33   virtual bool Launch(const LaunchParams& launch_params) OVERRIDE;
34
35   virtual base::FilePath GetSplashScreenPath() OVERRIDE;
36
37 #if defined(USE_OZONE)
38   virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
39   virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
40 #endif
41
42   bool is_suspended_;
43 };
44
45 inline ApplicationTizen* ToApplicationTizen(Application* app) {
46   return static_cast<ApplicationTizen*>(app);
47 }
48
49 }  // namespace application
50 }  // namespace xwalk
51
52 #endif  // XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_