Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('settings', function() { | |
| 6 /** @interface */ | |
| 7 function ResetBrowserProxy() {} | |
| 8 | |
| 9 ResetBrowserProxy.prototype = { | |
| 10 /** | |
| 11 * @param {boolean} sendSettings Whether to report the settings. | |
|
tommycli
2016/04/05 18:46:28
nit: and this can be in a separate CL, but the nam
dpapad
2016/04/05 19:23:12
No, it is whether the settings that are being rese
| |
| 12 * @return {!Promise} A promise firing once resetting has completed. | |
| 13 */ | |
| 14 performResetProfileSettings: function(sendSettings) {}, | |
| 15 | |
| 16 /** | |
| 17 * A method to be called when the reset profile dialog is hidden. | |
| 18 */ | |
| 19 onHideResetProfileDialog: function() {}, | |
| 20 | |
| 21 /** | |
| 22 * A method to be called when the reset profile banner is hidden. | |
| 23 */ | |
| 24 onHideResetProfileBanner: function() {}, | |
| 25 | |
| 26 /** | |
| 27 * A method to be called when the reset profile dialog is shown. | |
| 28 */ | |
| 29 onShowResetProfileDialog: function() {}, | |
| 30 | |
| 31 <if expr="chromeos"> | |
| 32 /** | |
| 33 * A method to be called when the reset powerwash dialog is shown. | |
| 34 */ | |
| 35 onPowerwashDialogShow: function() {}, | |
| 36 | |
| 37 /** | |
| 38 * Initiates a factory reset and restarts ChromeOS. | |
| 39 */ | |
| 40 requestFactoryResetRestart: function() {}, | |
| 41 </if> | |
| 42 }; | |
| 43 | |
| 44 /** | |
| 45 * @constructor | |
| 46 * @implements {settings.ResetBrowserProxy} | |
| 47 */ | |
| 48 function ResetBrowserProxyImpl() {} | |
| 49 cr.addSingletonGetter(ResetBrowserProxyImpl); | |
| 50 | |
| 51 ResetBrowserProxyImpl.prototype = { | |
| 52 /** @override */ | |
| 53 performResetProfileSettings: function(sendSettings) { | |
| 54 return cr.sendWithPromise('performResetProfileSettings', sendSettings); | |
| 55 }, | |
| 56 | |
| 57 /** @override */ | |
| 58 onHideResetProfileDialog: function() { | |
| 59 chrome.send('onHideResetProfileDialog'); | |
| 60 }, | |
| 61 | |
| 62 /** @override */ | |
| 63 onHideResetProfileBanner: function() { | |
| 64 chrome.send('onHideResetProfileBanner'); | |
| 65 }, | |
| 66 | |
| 67 /** @override */ | |
| 68 onShowResetProfileDialog: function() { | |
| 69 chrome.send('onShowResetProfileDialog'); | |
| 70 }, | |
| 71 | |
| 72 <if expr="chromeos"> | |
| 73 /** @override */ | |
| 74 onPowerwashDialogShow: function() { | |
| 75 chrome.send('onPowerwashDialogShow'); | |
| 76 }, | |
| 77 | |
| 78 /** @override */ | |
| 79 requestFactoryResetRestart: function() { | |
| 80 chrome.send('requestFactoryResetRestart'); | |
| 81 }, | |
| 82 </if> | |
| 83 }; | |
| 84 | |
| 85 return { | |
| 86 ResetBrowserProxyImpl: ResetBrowserProxyImpl, | |
| 87 }; | |
| 88 }); | |
| OLD | NEW |