#include "xwalk/application/common/manifest_handlers/warp_handler.h"
#include "xwalk/runtime/browser/runtime.h"
#include "xwalk/runtime/browser/runtime_context.h"
+#include "xwalk/runtime/browser/runtime_defered_ui_strategy.h"
#include "xwalk/runtime/browser/xwalk_runner.h"
#if defined(OS_TIZEN)
security_mode_enabled_(false),
runtime_context_(runtime_context),
observer_(NULL),
+ ui_strategy_(new RuntimeDeferedUIStrategy),
remote_debugging_enabled_(false),
weak_factory_(this) {
DCHECK(runtime_context_);
params.state = is_wgt ?
GetWindowShowState<Manifest::TYPE_WIDGET>(launch_params):
GetWindowShowState<Manifest::TYPE_MANIFEST>(launch_params);
+ window_show_params_.state = params.state;
params.splash_screen_path = GetSplashScreenPath();
- runtime->AttachWindow(params);
+ ui_strategy_->Show(runtime, params);
return true;
}
void Application::OnRuntimeAdded(Runtime* runtime) {
DCHECK(runtime);
runtime->set_remote_debugging_enabled(remote_debugging_enabled_);
+ if (!runtimes_.empty())
+ ui_strategy_->Show(runtime, window_show_params_);
runtimes_.insert(runtime);
}
DCHECK(runtime);
runtimes_.erase(runtime);
- if (runtimes_.empty()) {
-#if defined(OS_TIZEN_MOBILE)
- runtime->CloseRootWindow();
-#endif
+ if (runtimes_.empty())
base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&Application::NotifyTermination,
weak_factory_.GetWeakPtr()));
- }
}
void Application::RenderProcessExited(RenderProcessHost* host,