| Index: chrome/browser/resources/extensions/chromeos/kiosk_app_list.js
|
| diff --git a/chrome/browser/resources/extensions/chromeos/kiosk_app_list.js b/chrome/browser/resources/extensions/chromeos/kiosk_app_list.js
|
| index 1af01cf21eeffa7eb3e8b7da786e9e129c5c7e67..3652f95bd6d7c2f17ba915270112e04d73ba7abc 100644
|
| --- a/chrome/browser/resources/extensions/chromeos/kiosk_app_list.js
|
| +++ b/chrome/browser/resources/extensions/chromeos/kiosk_app_list.js
|
| @@ -17,14 +17,29 @@ cr.define('extensions', function() {
|
| KioskAppList.prototype = {
|
| __proto__: List.prototype,
|
|
|
| + /**
|
| + * True if auto launch feature can be configured.
|
| + * @type {?boolean}
|
| + */
|
| + autoLaunchEnabled_: false,
|
| +
|
| /** @override */
|
| createItem: function(app) {
|
| var item = new KioskAppListItem();
|
| item.data = app;
|
| + item.autoLaunchEnabled = this.autoLaunchEnabled_;
|
| return item;
|
| },
|
|
|
| /**
|
| + * Sets auto launch enabled flag.
|
| + * @param {boolean} enabled True if auto launch should be enabled.
|
| + */
|
| + setAutoLaunchEnabled: function(enabled) {
|
| + this.autoLaunchEnabled_ = enabled;
|
| + },
|
| +
|
| + /**
|
| * Loads the given list of apps.
|
| * @param {!Array.<!Object>} apps An array of app info objects.
|
| */
|
| @@ -67,15 +82,22 @@ cr.define('extensions', function() {
|
| * @private
|
| */
|
| data_: null,
|
| +
|
| get data() {
|
| assert(this.data_);
|
| return this.data_;
|
| },
|
| +
|
| set data(data) {
|
| this.data_ = data;
|
| this.redraw();
|
| },
|
|
|
| + set autoLaunchEnabled(enabled) {
|
| + this.querySelector('.enable-auto-launch-button').hidden = !enabled;
|
| + this.querySelector('.disable-auto-launch-button').hidden = !enabled;
|
| + },
|
| +
|
| /**
|
| * Getter for the icon element.
|
| * @type {Element}
|
| @@ -111,9 +133,9 @@ cr.define('extensions', function() {
|
| }.bind(this);
|
|
|
| this.querySelector('.enable-auto-launch-button').onclick =
|
| - sendMessageWithId('enableKioskAutoLaunch');
|
| + sendMessageWithId('enableKioskAutoLaunch');
|
| this.querySelector('.disable-auto-launch-button').onclick =
|
| - sendMessageWithId('disableKioskAutoLaunch');
|
| + sendMessageWithId('disableKioskAutoLaunch');
|
| this.querySelector('.row-delete-button').onclick =
|
| sendMessageWithId('removeKioskApp');
|
| },
|
|
|