1 // Copyright (c) 2013 Intel Corporation. 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.
5 #include "xwalk/runtime/browser/xwalk_runner_tizen.h"
7 #include "content/public/browser/browser_thread.h"
8 #include "crypto/nss_util.h"
9 #include "xwalk/runtime/browser/sysapps_component.h"
10 #include "xwalk/runtime/browser/xwalk_component.h"
11 #include "xwalk/runtime/common/xwalk_runtime_features.h"
15 XWalkRunnerTizen::XWalkRunnerTizen() {}
17 XWalkRunnerTizen::~XWalkRunnerTizen() {}
20 XWalkRunnerTizen* XWalkRunnerTizen::GetInstance() {
21 return static_cast<XWalkRunnerTizen*>(XWalkRunner::GetInstance());
24 void XWalkRunnerTizen::PreMainMessageLoopRun() {
25 XWalkRunner::PreMainMessageLoopRun();
27 // NSSInitSingleton is a costly operation (up to 100ms on VTC-1010),
28 // resulting in postponing the parsing and composition steps of the render
29 // process at cold start. Therefore, move the initialization logic here.
30 if (XWalkRunner::is_running_as_service()) {
31 content::BrowserThread::PostTask(
32 content::BrowserThread::IO,
34 base::Bind(&crypto::EnsureNSSInit));
38 std::string XWalkRunnerTizen::GetLocale() const {
39 return tizen_locale_listener_.GetLocale();