Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / chromeos / app_mode / kiosk_test_app / src / main.js
1 // Copyright (c) 2013 The Chromium Authors. 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.
4
5 chrome.app.runtime.onLaunched.addListener(function(launchData) {
6   if (launchData.isKioskSession)
7     chrome.test.sendMessage('launchData.isKioskSession = true');
8   if (chrome.power)
9     chrome.power.requestKeepAwake('display');
10   else
11     chrome.experimental.power.requestKeepAwake(function() {});
12
13   chrome.app.window.create('app_main.html',
14       { 'width': 1920,
15         'height': 1080 },
16       function(window) {});
17 });