Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: chrome/browser/resources/extensions/chromeos/kiosk_app_list.js

Issue 130613004: Enabled consumer kiosk mode for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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');
},

Powered by Google App Engine
This is Rietveld 408576698