Chromium Code Reviews| 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..34097132c49db6e86fa2b891f487dd62d2a319d7 |
| --- /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. |
| + */ |
|
Dan Beam
2016/01/13 23:45:22
* found in the LICENSE file. */
anthonyvd
2016/01/18 21:40:08
Done.
|
| + |
| +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); |
| + $('undoButton').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); |