| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 chrome.app.runtime.onLaunched.addListener(function(launchData) { | 5 chrome.app.runtime.onLaunched.addListener(function(launchData) { |
| 6 if (launchData.isKioskSession) | 6 if (launchData.isKioskSession) |
| 7 chrome.test.sendMessage('launchData.isKioskSession = true'); | 7 chrome.test.sendMessage('launchData.isKioskSession = true'); |
| 8 if (chrome.power) | 8 if (chrome.power) |
| 9 chrome.power.requestKeepAwake('display'); | 9 chrome.power.requestKeepAwake('display'); |
| 10 else | 10 else |
| 11 chrome.experimental.power.requestKeepAwake(function() {}); | 11 chrome.experimental.power.requestKeepAwake(function() {}); |
| 12 | 12 |
| 13 chrome.app.window.create('app_main.html', | 13 chrome.app.window.create('app_main.html', |
| 14 { 'width': 1920, | 14 { 'width': 1920, |
| 15 'height': 1080 }, | 15 'height': 1080 }, |
| 16 function(window) { | 16 function(window) {}); |
| 17 window.close(); | |
| 18 }); | |
| 19 }); | 17 }); |
| OLD | NEW |