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

Unified Diff: chrome/browser/resources/chromeos/login/display_manager.js

Issue 61523002: cros: Use AlertDialog for remora device requisition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/display_manager.js
diff --git a/chrome/browser/resources/chromeos/login/display_manager.js b/chrome/browser/resources/chromeos/login/display_manager.js
index 73edc31cbf83e15fd40930f8a2a987631dcd414f..5feb0812b9741906f26360e5a5bec0c9fccfaf57 100644
--- a/chrome/browser/resources/chromeos/login/display_manager.js
+++ b/chrome/browser/resources/chromeos/login/display_manager.js
@@ -229,10 +229,8 @@ cr.define('cr.ui.login', function() {
if (this.isOobeUI())
this.showDeviceRequisitionPrompt_();
} else if (name == ACCELERATOR_DEVICE_REQUISITION_REMORA) {
- if (this.isOobeUI()) {
- this.deviceRequisition_ = 'remora';
- this.showDeviceRequisitionPrompt_();
- }
+ if (this.isOobeUI())
+ this.showDeviceRequisitionRemoraPrompt_();
} else if (name == ACCELERATOR_APP_LAUNCH_BAILOUT) {
var currentStepId = this.screens_[this.currentStep_];
if (currentStepId == SCREEN_APP_LAUNCH_SPLASH)
@@ -590,6 +588,24 @@ cr.define('cr.ui.login', function() {
},
/**
+ * Shows the special remora device requisition prompt.
+ * @private
+ */
+ showDeviceRequisitionRemoraPrompt_: function() {
+ if (!this.deviceRequisitionRemoraDialog_) {
+ this.deviceRequisitionRemoraDialog_ =
+ new cr.ui.dialogs.AlertDialog(document.body);
+ this.deviceRequisitionRemoraDialog_.setOkLabel(
+ loadTimeData.getString('deviceRequisitionPromptOk'));
+ }
+ this.deviceRequisitionRemoraDialog_.show(
+ loadTimeData.getString('deviceRequisitionRemoraPromptText'),
+ function() {
+ chrome.send('setDeviceRequisition', ['remora']);
+ });
+ },
+
+ /**
* Returns true if Oobe UI is shown.
*/
isOobeUI: function() {
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698