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

Side by Side Diff: chrome/browser/resources/login/display_manager.js

Issue 183923008: Fixed handling of 'oem_device_requisition' VPD value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 Display manager for WebUI OOBE and login. 6 * @fileoverview Display manager for WebUI OOBE and login.
7 */ 7 */
8 8
9 // TODO(xiyuan): Find a better to share those constants. 9 // TODO(xiyuan): Find a better to share those constants.
10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect';
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 this.onConfirmDeviceRequisitionPrompt_.bind(this)); 589 this.onConfirmDeviceRequisitionPrompt_.bind(this));
590 }, 590 },
591 591
592 /** 592 /**
593 * Confirmation handle for the device requisition prompt. 593 * Confirmation handle for the device requisition prompt.
594 * @param {string} value The value entered by the user. 594 * @param {string} value The value entered by the user.
595 * @private 595 * @private
596 */ 596 */
597 onConfirmDeviceRequisitionPrompt_: function(value) { 597 onConfirmDeviceRequisitionPrompt_: function(value) {
598 this.deviceRequisition_ = value; 598 this.deviceRequisition_ = value;
599 chrome.send('setDeviceRequisition', [value == '' ? 'none' : value]);
600 },
601
602 /**
603 * Confirmation handle for the device requisition prompt.
604 * @param {string} value The value entered by the user.
605 * @private
606 */
607 onConfirmDeviceRequisitionPrompt_: function(value) {
xiyuan 2014/03/01 04:38:58 Looks like the version at line 597-600 is the one
zel 2014/03/01 21:30:27 Done.
608 this.deviceRequisition_ = value;
599 chrome.send('setDeviceRequisition', [value]); 609 chrome.send('setDeviceRequisition', [value]);
600 }, 610 },
601 611
602 /** 612 /**
603 * Called when window size changed. Notifies current screen about change. 613 * Called when window size changed. Notifies current screen about change.
604 * @private 614 * @private
605 */ 615 */
606 onWindowResize_: function() { 616 onWindowResize_: function() {
607 var currentScreenId = this.screens_[this.currentStep_]; 617 var currentScreenId = this.screens_[this.currentStep_];
608 var currentScreen = $(currentScreenId); 618 var currentScreen = $(currentScreenId);
(...skipping 17 matching lines...) Expand all
626 if (!this.deviceRequisitionRemoraDialog_) { 636 if (!this.deviceRequisitionRemoraDialog_) {
627 this.deviceRequisitionRemoraDialog_ = 637 this.deviceRequisitionRemoraDialog_ =
628 new cr.ui.dialogs.ConfirmDialog(document.body); 638 new cr.ui.dialogs.ConfirmDialog(document.body);
629 this.deviceRequisitionRemoraDialog_.setOkLabel( 639 this.deviceRequisitionRemoraDialog_.setOkLabel(
630 loadTimeData.getString('deviceRequisitionRemoraPromptOk')); 640 loadTimeData.getString('deviceRequisitionRemoraPromptOk'));
631 this.deviceRequisitionRemoraDialog_.setCancelLabel( 641 this.deviceRequisitionRemoraDialog_.setCancelLabel(
632 loadTimeData.getString('deviceRequisitionRemoraPromptCancel')); 642 loadTimeData.getString('deviceRequisitionRemoraPromptCancel'));
633 } 643 }
634 this.deviceRequisitionRemoraDialog_.show( 644 this.deviceRequisitionRemoraDialog_.show(
635 loadTimeData.getString('deviceRequisitionRemoraPromptText'), 645 loadTimeData.getString('deviceRequisitionRemoraPromptText'),
636 function() { 646 function() { // onShow
637 chrome.send('setDeviceRequisition', ['remora']); 647 chrome.send('setDeviceRequisition', ['remora']);
648 },
649 function() { // onCancel
650 chrome.send('setDeviceRequisition', ['none']);
638 }); 651 });
639 }, 652 },
640 653
641 /** 654 /**
642 * Returns true if Oobe UI is shown. 655 * Returns true if Oobe UI is shown.
643 */ 656 */
644 isOobeUI: function() { 657 isOobeUI: function() {
645 return document.body.classList.contains('oobe-display'); 658 return document.body.classList.contains('oobe-display');
646 }, 659 },
647 660
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 */ 875 */
863 DisplayManager.refocusCurrentPod = function() { 876 DisplayManager.refocusCurrentPod = function() {
864 $('pod-row').refocusCurrentPod(); 877 $('pod-row').refocusCurrentPod();
865 }; 878 };
866 879
867 // Export 880 // Export
868 return { 881 return {
869 DisplayManager: DisplayManager 882 DisplayManager: DisplayManager
870 }; 883 };
871 }); 884 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698