summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js')
-rw-r--r--chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js114
1 files changed, 54 insertions, 60 deletions
diff --git a/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js b/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js
index c5cb104af72..b98c5ee1fe9 100644
--- a/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js
+++ b/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_browser_proxy.js
@@ -6,75 +6,69 @@
* @fileoverview A helper object used by the sync confirmation dialog to
* interact with the browser.
*/
+import {addSingletonGetter} from 'chrome://resources/js/cr.m.js';
-cr.define('sync.confirmation', function() {
- /** @interface */
- class SyncConfirmationBrowserProxy {
- /**
- * Called when the user confirms the Sync Confirmation dialog.
- * @param {!Array<string>} description Strings that the user was presented
- * with in the UI.
- * @param {string} confirmation Text of the element that the user
- * clicked on.
- */
- confirm(description, confirmation) {}
+/** @interface */
+export class SyncConfirmationBrowserProxy {
+ /**
+ * Called when the user confirms the Sync Confirmation dialog.
+ * @param {!Array<string>} description Strings that the user was presented
+ * with in the UI.
+ * @param {string} confirmation Text of the element that the user
+ * clicked on.
+ */
+ confirm(description, confirmation) {}
- /**
- * Called when the user undoes the Sync confirmation.
- */
- undo() {}
+ /**
+ * Called when the user undoes the Sync confirmation.
+ */
+ undo() {}
- /**
- * Called when the user clicks on the Settings link in
- * the Sync Confirmation dialog.
- * @param {!Array<string>} description Strings that the user was presented
- * with in the UI.
- * @param {string} confirmation Text of the element that the user
- * clicked on.
- */
- goToSettings(description, confirmation) {}
+ /**
+ * Called when the user clicks on the Settings link in
+ * the Sync Confirmation dialog.
+ * @param {!Array<string>} description Strings that the user was presented
+ * with in the UI.
+ * @param {string} confirmation Text of the element that the user
+ * clicked on.
+ */
+ goToSettings(description, confirmation) {}
- /** @param {!Array<number>} height */
- initializedWithSize(height) {}
+ /** @param {!Array<number>} height */
+ initializedWithSize(height) {}
- /**
- * Called when the WebUIListener for "account-image-changed" was added.
- */
- requestAccountImage() {}
- }
-
- /** @implements {sync.confirmation.SyncConfirmationBrowserProxy} */
- class SyncConfirmationBrowserProxyImpl {
- /** @override */
- confirm(description, confirmation) {
- chrome.send('confirm', [description, confirmation]);
- }
+ /**
+ * Called when the WebUIListener for "account-image-changed" was added.
+ */
+ requestAccountImage() {}
+}
- /** @override */
- undo() {
- chrome.send('undo');
- }
+/** @implements {SyncConfirmationBrowserProxy} */
+export class SyncConfirmationBrowserProxyImpl {
+ /** @override */
+ confirm(description, confirmation) {
+ chrome.send('confirm', [description, confirmation]);
+ }
- /** @override */
- goToSettings(description, confirmation) {
- chrome.send('goToSettings', [description, confirmation]);
- }
+ /** @override */
+ undo() {
+ chrome.send('undo');
+ }
- /** @override */
- initializedWithSize(height) {
- chrome.send('initializedWithSize', height);
- }
+ /** @override */
+ goToSettings(description, confirmation) {
+ chrome.send('goToSettings', [description, confirmation]);
+ }
- /** @override */
- requestAccountImage() {
- chrome.send('accountImageRequest');
- }
+ /** @override */
+ initializedWithSize(height) {
+ chrome.send('initializedWithSize', height);
}
- cr.addSingletonGetter(SyncConfirmationBrowserProxyImpl);
+ /** @override */
+ requestAccountImage() {
+ chrome.send('accountImageRequest');
+ }
+}
- return {
- SyncConfirmationBrowserProxy: SyncConfirmationBrowserProxy,
- SyncConfirmationBrowserProxyImpl: SyncConfirmationBrowserProxyImpl,
- };
-});
+addSingletonGetter(SyncConfirmationBrowserProxyImpl);