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

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

Issue 2808293003: Sync confirmation: hide extraneous checkbox ripple on early focus (Closed)
Patch Set: . 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
« no previous file with comments | « chrome/browser/resources/signin/sync_confirmation/sync_confirmation.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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', [$('configure-before-signing-in').checked]); 9 chrome.send('confirm', [$('configure-before-signing-in').checked]);
10 } 10 }
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 // Prefer using |document.body.offsetHeight| instead of 27 // Prefer using |document.body.offsetHeight| instead of
28 // |document.body.scrollHeight| as it returns the correct height of the 28 // |document.body.scrollHeight| as it returns the correct height of the
29 // even when the page zoom in Chrome is different than 100%. 29 // even when the page zoom in Chrome is different than 100%.
30 chrome.send('initializedWithSize', [document.body.offsetHeight]); 30 chrome.send('initializedWithSize', [document.body.offsetHeight]);
31 } 31 }
32 32
33 function clearFocus() { 33 function clearFocus() {
34 document.activeElement.blur(); 34 document.activeElement.blur();
35 document.documentElement.classList.add('focus-allowed');
35 } 36 }
36 37
37 function setUserImageURL(url) { 38 function setUserImageURL(url) {
38 if (loadTimeData.getBoolean('isSyncAllowed')) { 39 if (loadTimeData.getBoolean('isSyncAllowed')) {
39 $('profile-picture').src = url; 40 $('profile-picture').src = url;
40 } 41 }
41 } 42 }
42 43
43 function onPictureLoaded(e) { 44 function onPictureLoaded(e) {
44 if (loadTimeData.getBoolean('isSyncAllowed')) { 45 if (loadTimeData.getBoolean('isSyncAllowed')) {
(...skipping 13 matching lines...) Expand all
58 } 59 }
59 60
60 return { 61 return {
61 clearFocus: clearFocus, 62 clearFocus: clearFocus,
62 initialize: initialize, 63 initialize: initialize,
63 setUserImageURL: setUserImageURL 64 setUserImageURL: setUserImageURL
64 }; 65 };
65 }); 66 });
66 67
67 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize); 68 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/signin/sync_confirmation/sync_confirmation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698