| Index: chrome/browser/resources/sync_confirmation/sync_confirmation.js
|
| diff --git a/chrome/browser/resources/sync_confirmation/sync_confirmation.js b/chrome/browser/resources/sync_confirmation/sync_confirmation.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bacec983e13e90cb60975a0e57dc22979521f663
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/sync_confirmation/sync_confirmation.js
|
| @@ -0,0 +1,38 @@
|
| +/* Copyright 2015 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('sync.confirmation', function() {
|
| + 'use strict';
|
| +
|
| + function onConfirm(e) {
|
| + chrome.send('confirm');
|
| + }
|
| +
|
| + function onUndo(e) {
|
| + chrome.send('undo');
|
| + }
|
| +
|
| + function onGoToSettings(e) {
|
| + chrome.send('goToSettings');
|
| + }
|
| +
|
| + function initialize() {
|
| + $('confirmButton').addEventListener('click', onConfirm);
|
| + $('undoLink').addEventListener('click', onUndo);
|
| + $('settingsLink').addEventListener('click', onGoToSettings);
|
| + chrome.send('initialized');
|
| + }
|
| +
|
| + function setUserImageURL(url) {
|
| + $('profile-picture').src = url;
|
| + }
|
| +
|
| + return {
|
| + initialize: initialize,
|
| + setUserImageURL: setUserImageURL
|
| + };
|
| +});
|
| +
|
| +document.addEventListener('DOMContentLoaded', sync.confirmation.initialize);
|
|
|