| 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 /** | 5 /** |
| 6 * @fileoverview Kiosk apps menu implementation. | 6 * @fileoverview Kiosk apps menu implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * Launch the app. If |diagnosticMode| is true, ask user to confirm. | 88 * Launch the app. If |diagnosticMode| is true, ask user to confirm. |
| 89 * @param {Object} app App data. | 89 * @param {Object} app App data. |
| 90 * @param {boolean} diagnosticMode Whether to run the app in diagnostic | 90 * @param {boolean} diagnosticMode Whether to run the app in diagnostic |
| 91 * mode. | 91 * mode. |
| 92 */ | 92 */ |
| 93 launchApp_: function(app, diagnosticMode) { | 93 launchApp_: function(app, diagnosticMode) { |
| 94 if (app.isAndroidApp) { |
| 95 chrome.send('launchArcKioskApp', [app.account_email]); |
| 96 return; |
| 97 } |
| 94 if (!diagnosticMode) { | 98 if (!diagnosticMode) { |
| 95 chrome.send('launchKioskApp', [app.id, false]); | 99 chrome.send('launchKioskApp', [app.id, false]); |
| 96 return; | 100 return; |
| 97 } | 101 } |
| 98 | 102 |
| 99 if (!this.confirmDiagnosticMode_) { | 103 if (!this.confirmDiagnosticMode_) { |
| 100 this.confirmDiagnosticMode_ = | 104 this.confirmDiagnosticMode_ = |
| 101 new cr.ui.dialogs.ConfirmDialog(document.body); | 105 new cr.ui.dialogs.ConfirmDialog(document.body); |
| 102 this.confirmDiagnosticMode_.setOkLabel( | 106 this.confirmDiagnosticMode_.setOkLabel( |
| 103 loadTimeData.getString('confirmKioskAppDiagnosticModeYes')); | 107 loadTimeData.getString('confirmKioskAppDiagnosticModeYes')); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 * mode. Default is false. | 165 * mode. Default is false. |
| 162 */ | 166 */ |
| 163 AppsMenuButton.runAppForTesting = function(id, opt_diagnostic_mode) { | 167 AppsMenuButton.runAppForTesting = function(id, opt_diagnostic_mode) { |
| 164 $('show-apps-button').findAndRunAppForTesting(id, opt_diagnostic_mode); | 168 $('show-apps-button').findAndRunAppForTesting(id, opt_diagnostic_mode); |
| 165 }; | 169 }; |
| 166 | 170 |
| 167 return { | 171 return { |
| 168 AppsMenuButton: AppsMenuButton | 172 AppsMenuButton: AppsMenuButton |
| 169 }; | 173 }; |
| 170 }); | 174 }); |
| OLD | NEW |