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

Unified Diff: chrome/browser/resources/options/chromeos/kiosk_app_disable_bailout_confirm.js

Issue 15966004: cros: Move kiosk settings to extensions page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix space Created 7 years, 7 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/options/chromeos/kiosk_app_disable_bailout_confirm.js
diff --git a/chrome/browser/resources/options/chromeos/kiosk_app_disable_bailout_confirm.js b/chrome/browser/resources/options/chromeos/kiosk_app_disable_bailout_confirm.js
deleted file mode 100644
index caa1ee3270428270624be6d1929d3d65f897d59c..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/options/chromeos/kiosk_app_disable_bailout_confirm.js
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-cr.define('options', function() {
- /** @const */ var OptionsPage = options.OptionsPage;
-
- /**
- * A confirmation overlay for disabling kiosk app bailout shortcut.
- * @extends {options.OptionsPage}
- * @constructor
- */
- function KioskDisableBailoutConfirm() {
- OptionsPage.call(this,
- 'kioskDisableBailoutConfirm',
- '',
- 'kiosk-disable-bailout-confirm-overlay');
- }
-
- cr.addSingletonGetter(KioskDisableBailoutConfirm);
-
- KioskDisableBailoutConfirm.prototype = {
- __proto__: OptionsPage.prototype,
-
- /** @override */
- initializePage: function() {
- OptionsPage.prototype.initializePage.call(this);
-
- var el = $('kiosk-disable-bailout-shortcut');
- el.customChangeHandler = this.handleDisableBailoutShortcutChange_;
-
- $('kiosk-disable-bailout-confirm-button').onclick = function(e) {
- OptionsPage.closeOverlay();
- Preferences.setBooleanPref(
- 'cros.accounts.deviceLocalAccountAutoLoginBailoutEnabled',
- false, true);
- };
- $('kiosk-disable-bailout-cancel-button').onclick = this.handleCancel;
- },
-
- /** @override */
- handleCancel: function() {
- OptionsPage.closeOverlay();
- $('kiosk-disable-bailout-shortcut').checked = false;
- },
-
- /**
- * Custom change handler for the disable bailout shortcut checkbox.
- * It blocks the underlying pref being changed and brings up confirmation
- * alert to user.
- * @private
- */
- handleDisableBailoutShortcutChange_: function() {
- // Let default processing happening if user un-checks the box.
- if (!$('kiosk-disable-bailout-shortcut').checked)
- return false;
-
- // Otherwise, show the confirmation overlay.
- OptionsPage.showPageByName('kioskDisableBailoutConfirm', false);
- return true;
- }
- };
-
- // Export
- return {
- KioskDisableBailoutConfirm: KioskDisableBailoutConfirm
- };
-});
-

Powered by Google App Engine
This is Rietveld 408576698