| Index: chrome/browser/resources/settings/reset_page/reset_browser_proxy.js
|
| diff --git a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4390e04a128f7d012ad78924925c7a7639500888
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js
|
| @@ -0,0 +1,89 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +cr.define('settings', function() {
|
| + /** @interface */
|
| + function ResetBrowserProxy() {}
|
| +
|
| + ResetBrowserProxy.prototype = {
|
| + /**
|
| + * @param {boolean} sendSettings Whether the user gave consent to upload
|
| + * broken settings to Google for analysis.
|
| + * @return {!Promise} A promise firing once resetting has completed.
|
| + */
|
| + performResetProfileSettings: function(sendSettings) {},
|
| +
|
| + /**
|
| + * A method to be called when the reset profile dialog is hidden.
|
| + */
|
| + onHideResetProfileDialog: function() {},
|
| +
|
| + /**
|
| + * A method to be called when the reset profile banner is hidden.
|
| + */
|
| + onHideResetProfileBanner: function() {},
|
| +
|
| + /**
|
| + * A method to be called when the reset profile dialog is shown.
|
| + */
|
| + onShowResetProfileDialog: function() {},
|
| +
|
| +<if expr="chromeos">
|
| + /**
|
| + * A method to be called when the reset powerwash dialog is shown.
|
| + */
|
| + onPowerwashDialogShow: function() {},
|
| +
|
| + /**
|
| + * Initiates a factory reset and restarts ChromeOS.
|
| + */
|
| + requestFactoryResetRestart: function() {},
|
| +</if>
|
| + };
|
| +
|
| + /**
|
| + * @constructor
|
| + * @implements {settings.ResetBrowserProxy}
|
| + */
|
| + function ResetBrowserProxyImpl() {}
|
| + cr.addSingletonGetter(ResetBrowserProxyImpl);
|
| +
|
| + ResetBrowserProxyImpl.prototype = {
|
| + /** @override */
|
| + performResetProfileSettings: function(sendSettings) {
|
| + return cr.sendWithPromise('performResetProfileSettings', sendSettings);
|
| + },
|
| +
|
| + /** @override */
|
| + onHideResetProfileDialog: function() {
|
| + chrome.send('onHideResetProfileDialog');
|
| + },
|
| +
|
| + /** @override */
|
| + onHideResetProfileBanner: function() {
|
| + chrome.send('onHideResetProfileBanner');
|
| + },
|
| +
|
| + /** @override */
|
| + onShowResetProfileDialog: function() {
|
| + chrome.send('onShowResetProfileDialog');
|
| + },
|
| +
|
| +<if expr="chromeos">
|
| + /** @override */
|
| + onPowerwashDialogShow: function() {
|
| + chrome.send('onPowerwashDialogShow');
|
| + },
|
| +
|
| + /** @override */
|
| + requestFactoryResetRestart: function() {
|
| + chrome.send('requestFactoryResetRestart');
|
| + },
|
| +</if>
|
| + };
|
| +
|
| + return {
|
| + ResetBrowserProxyImpl: ResetBrowserProxyImpl,
|
| + };
|
| +});
|
|
|