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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_device_disabled.js

Issue 692383005: Add DeviceDisablingManager to manage device disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_3_425574_disable_header_bar
Patch Set: Add destructor required by clang. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @fileoverview Device disabled screen implementation. 6 * @fileoverview Device disabled screen implementation.
7 */ 7 */
8 8
9 login.createScreen('DeviceDisabledScreen', 'device-disabled', function() { 9 login.createScreen('DeviceDisabledScreen', 'device-disabled', function() {
10 return { 10 return {
11 EXTERNAL_API: [ 11 EXTERNAL_API: [
12 'setMessage' 12 'setMessage'
13 ], 13 ],
14 14
15 /** 15 /**
16 * Ignore any accelerators the user presses on this screen.
17 */
18 ignoreAccelerators: true,
19
20 /**
16 * The visibility of the cancel button in the header bar is controlled by a 21 * The visibility of the cancel button in the header bar is controlled by a
17 * global. Although the device disabling screen hides the button, a 22 * global. Although the device disabling screen hides the button, a
18 * notification intended for an earlier screen (e.g animation finished) 23 * notification intended for an earlier screen (e.g animation finished)
19 * could re-show the button. If this happens, the current screen's cancel() 24 * could re-show the button. If this happens, the current screen's cancel()
20 * method will be shown when the user actually clicks the button. Make sure 25 * method will be shown when the user actually clicks the button. Make sure
21 * that this is a no-op. 26 * that this is a no-op.
22 */ 27 */
23 cancel: function() { 28 cancel: function() {
24 }, 29 },
25 30
26 /** 31 /**
27 * Event handler that is invoked just before the screen in shown. 32 * Event handler that is invoked just before the screen in shown.
28 */ 33 */
29 onBeforeShow: function() { 34 onBeforeShow: function() {
30 $('progress-dots').hidden = true; 35 $('progress-dots').hidden = true;
31 var headerBar = $('login-header-bar'); 36 var headerBar = $('login-header-bar');
32 headerBar.allowCancel = false; 37 headerBar.allowCancel = false;
33 headerBar.showGuestButton = false; 38 headerBar.showGuestButton = false;
34 headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN; 39 headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN;
35 }, 40 },
36 41
37 /** 42 /**
38 * Sets the message to show to the user. 43 * Sets the message to show to the user.
39 * @param {string} message The message to show to the user. 44 * @param {string} message The message to show to the user.
40 * @private 45 * @private
41 */ 46 */
42 setMessage: function(message) { 47 setMessage: function(message) {
48 // The contents of |message| is untrusted. Set it as |textContent| so that
49 // it gets treated as plain text and cannot be used to inject JS or HTML.
43 $('device-disabled-message').textContent = message; 50 $('device-disabled-message').textContent = message;
44 } 51 }
45 }; 52 };
46 }); 53 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/device_disabling_manager_unittest.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698