Prevent duplicated call of |Terminate|
[platform/framework/web/crosswalk-tizen.git] / runtime / browser / web_application.h
index 3fdbdfe..f35fd04 100755 (executable)
@@ -53,6 +53,9 @@ class WebApplication : public WebView::EventListener {
   void Terminate();
 
   void ClosePage();
+  void Exit();
+  void ProcessClosingPage();
+
   std::string data_path() const { return app_data_path_; }
   void set_terminator(std::function<void(void)> terminator) {
     terminator_ = terminator;
@@ -107,6 +110,12 @@ class WebApplication : public WebView::EventListener {
   virtual void OnRotatePrepared(WebView* view);
 #endif // MANUAL_ROTATE_FEATURE_SUPPORT
   static Eina_Bool CheckPluginSession(void* user_data);
+  static Eina_Bool ClosePageInExtendedMainLoop(void* user_data);
+  struct Timer
+  {
+    WebApplication* application;
+    Ecore_Timer* timer;
+  } main_loop, session_counter;
 
  private:
   bool Initialize();
@@ -132,6 +141,7 @@ class WebApplication : public WebView::EventListener {
   bool verbose_mode_;
   bool lang_changed_mode_;
   bool is_terminate_called_;
+  bool is_close_page_called_;
   Ewk_Context* ewk_context_;
   bool has_ownership_of_ewk_context_;
   NativeWindow* window_;