Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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('settings', function() { | 5 cr.define('settings', function() { |
| 6 /** @interface */ | 6 /** @interface */ |
| 7 function ResetBrowserProxy() {} | 7 function ResetBrowserProxy() {} |
| 8 | 8 |
| 9 ResetBrowserProxy.prototype = { | 9 ResetBrowserProxy.prototype = { |
| 10 /** | 10 /** |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 * A method to be called when the reset profile dialog is shown. | 28 * A method to be called when the reset profile dialog is shown. |
| 29 */ | 29 */ |
| 30 onShowResetProfileDialog: function() {}, | 30 onShowResetProfileDialog: function() {}, |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * Shows the settings that are about to be reset and which will be reported | 33 * Shows the settings that are about to be reset and which will be reported |
| 34 * to Google for analysis, in a new tab. | 34 * to Google for analysis, in a new tab. |
| 35 */ | 35 */ |
| 36 showReportedSettings: function() {}, | 36 showReportedSettings: function() {}, |
| 37 | 37 |
| 38 /** | |
| 39 * Retrieves the triggered reset tool name. | |
| 40 * @return {!Promise} A promise firing with the tool name, once it has been | |
|
Dan Beam
2016/09/28 01:40:09
can this be templatized, i.e. Promise<string>?
alito
2016/09/28 04:27:29
Done.
| |
| 41 * retrieved. | |
| 42 */ | |
| 43 getTriggeredResetToolName: function() {}, | |
| 44 | |
| 38 <if expr="chromeos"> | 45 <if expr="chromeos"> |
| 39 /** | 46 /** |
| 40 * A method to be called when the reset powerwash dialog is shown. | 47 * A method to be called when the reset powerwash dialog is shown. |
| 41 */ | 48 */ |
| 42 onPowerwashDialogShow: function() {}, | 49 onPowerwashDialogShow: function() {}, |
| 43 | 50 |
| 44 /** | 51 /** |
| 45 * Initiates a factory reset and restarts ChromeOS. | 52 * Initiates a factory reset and restarts ChromeOS. |
| 46 */ | 53 */ |
| 47 requestFactoryResetRestart: function() {}, | 54 requestFactoryResetRestart: function() {}, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 return entry.key + ': ' + entry.value.replace(/\n/g, ', '); | 90 return entry.key + ': ' + entry.value.replace(/\n/g, ', '); |
| 84 }); | 91 }); |
| 85 var win = window.open('about:blank'); | 92 var win = window.open('about:blank'); |
| 86 var div = win.document.createElement('div'); | 93 var div = win.document.createElement('div'); |
| 87 div.textContent = output.join('\n'); | 94 div.textContent = output.join('\n'); |
| 88 div.style.whiteSpace = 'pre'; | 95 div.style.whiteSpace = 'pre'; |
| 89 win.document.body.appendChild(div); | 96 win.document.body.appendChild(div); |
| 90 }); | 97 }); |
| 91 }, | 98 }, |
| 92 | 99 |
| 100 /** @override */ | |
| 101 getTriggeredResetToolName: function() { | |
| 102 return cr.sendWithPromise('getTriggeredResetToolName'); | |
| 103 }, | |
| 104 | |
| 93 <if expr="chromeos"> | 105 <if expr="chromeos"> |
| 94 /** @override */ | 106 /** @override */ |
| 95 onPowerwashDialogShow: function() { | 107 onPowerwashDialogShow: function() { |
| 96 chrome.send('onPowerwashDialogShow'); | 108 chrome.send('onPowerwashDialogShow'); |
| 97 }, | 109 }, |
| 98 | 110 |
| 99 /** @override */ | 111 /** @override */ |
| 100 requestFactoryResetRestart: function() { | 112 requestFactoryResetRestart: function() { |
| 101 chrome.send('requestFactoryResetRestart'); | 113 chrome.send('requestFactoryResetRestart'); |
| 102 }, | 114 }, |
| 103 </if> | 115 </if> |
| 104 }; | 116 }; |
| 105 | 117 |
| 106 return { | 118 return { |
| 107 ResetBrowserProxyImpl: ResetBrowserProxyImpl, | 119 ResetBrowserProxyImpl: ResetBrowserProxyImpl, |
| 108 }; | 120 }; |
| 109 }); | 121 }); |
| OLD | NEW |