The terminator has been registered by Runtime.
It makes a dependency from WebApplication to Runtime and does not assure
the existence of the Runtime instance.
Bug:
DF170116-01203
Url: http://suprem.sec.samsung.net/jira/browse/TWF-2805
Change-Id: I700bddab8fb392dca131ab5d3a913ed63e45b792
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
app_data_,
context_));
LOGGER(DEBUG) << "runtime.cc created web application";
- application_->set_terminator([](){ ui_app_exit(); });
-
LOGGER(DEBUG) << "runtime.cc ResetWebApplication() finished";
-
STEP_PROFILE_END("Runtime ResetWebApplication");
}
STEP_PROFILE_START("WebApplication Create");
application_ = new WebApplication(native_window_, app_data_);
STEP_PROFILE_END("WebApplication Create");
- application_->set_terminator([](){ watch_app_exit(); });
setlocale(LC_ALL, "");
bindtextdomain(kTextDomainRuntime, kTextLocalePath);
window_(window),
appid_(app_data->app_id()),
app_data_(app_data),
- locale_manager_(new common::LocaleManager()),
- terminator_(NULL) {
+ locale_manager_(new common::LocaleManager()) {
Initialize();
}
window_(window),
appid_(app_data->app_id()),
app_data_(app_data),
- locale_manager_(new common::LocaleManager()),
- terminator_(NULL) {
+ locale_manager_(new common::LocaleManager()) {
Initialize();
}
if (!is_terminate_called_)
ecore_main_loop_quit();
- if (terminator_) {
- LOGGER(DEBUG) << "terminator_";
- terminator_();
- } else {
- LOGGER(ERROR) << "There's no registered terminator.";
- elm_exit();
+ switch (app_data_->app_type()) {
+ case common::ApplicationData::AppType::UI:
+ LOGGER(ERROR) << "app_ui_exit";
+ ui_app_exit();
+ break;
+#ifdef WATCH_FACE_FEATURE_SUPPORT
+ case common::ApplicationData::AppType::WATCH:
+ LOGGER(ERROR) << "watch_ui_exit";
+ watch_app_exit();
+ break;
+#endif
+ default:
+ LOGGER(ERROR) << "default terminator";
+ elm_exit();
}
}
void ProcessClosingPage();
std::string data_path() const { return app_data_path_; }
- void set_terminator(std::function<void(void)> terminator) {
- terminator_ = terminator;
- }
bool launched() const { return launched_; }
std::list<WebView*> view_stack() const { return view_stack_; }
std::unique_ptr<SplashScreen> splash_screen_;
std::unique_ptr<common::LocaleManager> locale_manager_;
std::unique_ptr<common::ResourceManager> resource_manager_;
- std::function<void(void)> terminator_;
int security_model_version_;
std::string csp_rule_;
std::string csp_report_rule_;