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 * A confirmation overlay for disabling kiosk app bailout shortcut. | 7 * A confirmation overlay for disabling kiosk app bailout shortcut. |
8 * @constructor | 8 * @constructor |
9 */ | 9 */ |
10 function KioskDisableBailoutConfirm() { | 10 function KioskDisableBailoutConfirm() {} |
11 } | |
12 | 11 |
13 cr.addSingletonGetter(KioskDisableBailoutConfirm); | 12 cr.addSingletonGetter(KioskDisableBailoutConfirm); |
14 | 13 |
15 KioskDisableBailoutConfirm.prototype = { | 14 KioskDisableBailoutConfirm.prototype = { |
16 /** | 15 /** |
17 * Initialize the page. | 16 * Initialize the page. |
18 */ | 17 */ |
19 initialize: function() { | 18 initialize: function() { |
20 var overlay = $('kiosk-disable-bailout-confirm-overlay'); | 19 var overlay = $('kiosk-disable-bailout-confirm-overlay'); |
21 cr.ui.overlay.setupOverlay(overlay); | 20 cr.ui.overlay.setupOverlay(overlay); |
(...skipping 23 matching lines...) Expand all Loading... |
45 * @private | 44 * @private |
46 */ | 45 */ |
47 handleDisableBailoutShortcutChange_: function() { | 46 handleDisableBailoutShortcutChange_: function() { |
48 // Just set the pref if user un-checks the box. | 47 // Just set the pref if user un-checks the box. |
49 if (!$('kiosk-disable-bailout-shortcut').checked) { | 48 if (!$('kiosk-disable-bailout-shortcut').checked) { |
50 chrome.send('setDisableBailoutShortcut', [false]); | 49 chrome.send('setDisableBailoutShortcut', [false]); |
51 return false; | 50 return false; |
52 } | 51 } |
53 | 52 |
54 // Otherwise, show the confirmation overlay. | 53 // Otherwise, show the confirmation overlay. |
55 extensions.ExtensionSettings.showOverlay($( | 54 extensions.ExtensionSettings.showOverlay( |
56 'kiosk-disable-bailout-confirm-overlay')); | 55 $('kiosk-disable-bailout-confirm-overlay')); |
57 return true; | 56 return true; |
58 } | 57 } |
59 }; | 58 }; |
60 | 59 |
61 // Export | 60 // Export |
62 return { | 61 return {KioskDisableBailoutConfirm: KioskDisableBailoutConfirm}; |
63 KioskDisableBailoutConfirm: KioskDisableBailoutConfirm | |
64 }; | |
65 }); | 62 }); |
66 | |
OLD | NEW |