Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* Copyright 2015 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 */ | |
|
Dan Beam
2016/01/13 23:45:22
* found in the LICENSE file. */
anthonyvd
2016/01/18 21:40:08
Done.
| |
| 5 | |
| 6 cr.define('sync.confirmation', function() { | |
| 7 'use strict'; | |
| 8 | |
| 9 function onConfirm(e) { | |
| 10 chrome.send('confirm'); | |
| 11 } | |
| 12 | |
| 13 function onUndo(e) { | |
| 14 chrome.send('undo'); | |
| 15 } | |
| 16 | |
| 17 function onGoToSettings(e) { | |
| 18 chrome.send('goToSettings'); | |
| 19 } | |
| 20 | |
| 21 function initialize() { | |
| 22 $('confirmButton').addEventListener('click', onConfirm); | |
| 23 $('undoButton').addEventListener('click', onUndo); | |
| 24 $('settingsLink').addEventListener('click', onGoToSettings); | |
| 25 chrome.send('initialized'); | |
| 26 } | |
| 27 | |
| 28 function setUserImageURL(url) { | |
| 29 $('profile-picture').src = url; | |
| 30 } | |
| 31 | |
| 32 return { | |
| 33 initialize: initialize, | |
| 34 setUserImageURL: setUserImageURL | |
| 35 }; | |
| 36 }); | |
| 37 | |
| 38 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize); | |
| OLD | NEW |