OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 cr.define('extensions', function() { | 5 cr.define('extensions', function() { |
6 /** | 6 /** |
7 * Encapsulated handling of ChromeOS kiosk apps options page. | 7 * Encapsulated handling of ChromeOS kiosk apps options page. |
8 * @constructor | 8 * @constructor |
9 */ | 9 */ |
10 function KioskAppsOverlay() { | 10 function KioskAppsOverlay() { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 * @param {!string} appName App name/id to show in error banner. | 122 * @param {!string} appName App name/id to show in error banner. |
123 */ | 123 */ |
124 KioskAppsOverlay.showError = function(appName) { | 124 KioskAppsOverlay.showError = function(appName) { |
125 KioskAppsOverlay.getInstance().showError(appName); | 125 KioskAppsOverlay.getInstance().showError(appName); |
126 }; | 126 }; |
127 | 127 |
128 /** | 128 /** |
129 * Enables consumer kiosk. | 129 * Enables consumer kiosk. |
130 * @param {!boolean} enable True if consumer kiosk feature is enabled. | 130 * @param {!boolean} enable True if consumer kiosk feature is enabled. |
131 */ | 131 */ |
132 KioskAppsOverlay.enableKiosk = function(enable) { | 132 KioskAppsOverlay.enableKiosk = function(params) { |
133 $('add-kiosk-app').hidden = !enable; | 133 $('add-kiosk-app').hidden = !params.kioskEnabled; |
| 134 $('kiosk-app-list').setAutoLaunchEnabled(params.autoLaunchEnabled); |
134 }; | 135 }; |
135 | 136 |
136 // Export | 137 // Export |
137 return { | 138 return { |
138 KioskAppsOverlay: KioskAppsOverlay | 139 KioskAppsOverlay: KioskAppsOverlay |
139 }; | 140 }; |
140 }); | 141 }); |
141 | 142 |
142 <include src="kiosk_app_list.js"></include> | 143 <include src="kiosk_app_list.js"></include> |
143 <include src="kiosk_app_disable_bailout_confirm.js"></include> | 144 <include src="kiosk_app_disable_bailout_confirm.js"></include> |
OLD | NEW |