The view stack needs to be handled in class WebApplication.
Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2743
Change-Id: Ide43a3d254da9d1746b5235a97ed401aa24ea7b8
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
}
void Runtime::ClosePageFromOnTerminate(WebApplication* app) {
- if (app) {
- std::list<WebView*> vstack = app->view_stack();
- auto it = vstack.begin();
- if (it != vstack.end()) {
- Runtime::is_on_terminate_called = true;
- for (; it != vstack.end(); ++it) {
- vstack.front()->SetVisibility(false);
- ewk_view_page_close((*it)->evas_object());
- }
- }
- }
+ if (app)
+ app->ClosePageFromOnTerminate();
}
} // namespace runtime
extension_server->Shutdown();
}
+void WebApplication::ClosePageFromOnTerminate() {
+ auto it = view_stack_.begin();
+ if (it != view_stack_.end()) {
+ runtime::Runtime::is_on_terminate_called = true;
+ for (; it != view_stack_.end(); ++it) {
+ view_stack_.front()->SetVisibility(false);
+ ewk_view_page_close((*it)->evas_object());
+ }
+ }
+}
+
void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) {
if (view_stack_.size() > 0 && view_stack_.front() != NULL)
view_stack_.front()->SetVisibility(false);
void Suspend();
void Terminate();
+ void ClosePageFromOnTerminate();
std::string data_path() const { return app_data_path_; }
void set_terminator(std::function<void(void)> terminator) {
terminator_ = terminator;