7f12d15e34ceed2cbd73b45097726bd0aaccea56
[platform/framework/web/crosswalk-tizen.git] / src / runtime / runtime.h
1 // Copyright 2015 Samsung Electronics Co, Ltd. 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 WRT_RUNTIME_RUNTIME_H_
6 #define WRT_RUNTIME_RUNTIME_H_
7
8 #include <app.h>
9 #include <string>
10
11 #include "runtime/native_window.h"
12 #include "runtime/web_application.h"
13
14 namespace wrt {
15
16 class Runtime {
17  public:
18   Runtime();
19   virtual ~Runtime();
20
21   virtual int Exec(int argc, char* argv[]);
22
23  protected:
24   virtual bool OnCreate();
25   virtual void OnTerminate();
26   virtual void OnPause();
27   virtual void OnResume();
28   virtual void OnAppControl(app_control_h app_control);
29   virtual void OnLanguageChanged(const std::string& language);
30   virtual void OnLowMemory();
31
32  private:
33   WebApplication* application_;
34   NativeWindow* native_window_;
35 };
36
37 }  // namespace wrt
38
39 #endif  // WRT_RUNTIME_RUNTIME_H_