Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js

Issue 2800683008: Sync confirmation: change "Settings" link to checkbox (Closed)
Patch Set: tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright 2015 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 4
5 cr.define('sync.confirmation', function() { 5 cr.define('sync.confirmation', function() {
6 'use strict'; 6 'use strict';
7 7
8 function onConfirm(e) { 8 function onConfirm(e) {
9 chrome.send('confirm'); 9 chrome.send('confirm', [$('configure-before-signing-in').checked]);
10 } 10 }
11 11
12 function onUndo(e) { 12 function onUndo(e) {
13 chrome.send('undo'); 13 chrome.send('undo');
14 } 14 }
15 15
16 function onGoToSettings(e) {
17 chrome.send('goToSettings');
18 }
19
20 function initialize() { 16 function initialize() {
21 document.addEventListener('keydown', onKeyDown); 17 document.addEventListener('keydown', onKeyDown);
22 $('confirmButton').addEventListener('click', onConfirm); 18 $('confirmButton').addEventListener('click', onConfirm);
23 $('undoButton').addEventListener('click', onUndo); 19 $('undoButton').addEventListener('click', onUndo);
24 if (loadTimeData.getBoolean('isSyncAllowed')) { 20 if (loadTimeData.getBoolean('isSyncAllowed')) {
25 $('settingsLink').addEventListener('click', onGoToSettings);
26 $('profile-picture').addEventListener('load', onPictureLoaded); 21 $('profile-picture').addEventListener('load', onPictureLoaded);
27 $('syncDisabledDetails').hidden = true; 22 $('syncDisabledDetails').hidden = true;
28 } else { 23 } else {
29 $('syncConfirmationDetails').hidden = true; 24 $('syncConfirmationDetails').hidden = true;
30 } 25 }
31 26
32 // Prefer using |document.body.offsetHeight| instead of 27 // Prefer using |document.body.offsetHeight| instead of
33 // |document.body.scrollHeight| as it returns the correct height of the 28 // |document.body.scrollHeight| as it returns the correct height of the
34 // even when the page zoom in Chrome is different than 100%. 29 // even when the page zoom in Chrome is different than 100%.
35 chrome.send('initializedWithSize', [document.body.offsetHeight]); 30 chrome.send('initializedWithSize', [document.body.offsetHeight]);
(...skipping 27 matching lines...) Expand all
63 } 58 }
64 59
65 return { 60 return {
66 clearFocus: clearFocus, 61 clearFocus: clearFocus,
67 initialize: initialize, 62 initialize: initialize,
68 setUserImageURL: setUserImageURL 63 setUserImageURL: setUserImageURL
69 }; 64 };
70 }); 65 });
71 66
72 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize); 67 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698