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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 1145883002: Don't pointerify [☺] User Name nor user@name.com In the top, right corner of chrome://apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/ntp4/new_tab.css ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @fileoverview New tab page 6 * @fileoverview New tab page
7 * This is the main code for the new tab page used by touch-enabled Chrome 7 * This is the main code for the new tab page used by touch-enabled Chrome
8 * browsers. For now this is still a prototype. 8 * browsers. For now this is still a prototype.
9 */ 9 */
10 10
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 * @param {string} loginHeader The first line of text. 534 * @param {string} loginHeader The first line of text.
535 * @param {string} loginSubHeader The second line of text. 535 * @param {string} loginSubHeader The second line of text.
536 * @param {string} iconURL The url for the login status icon. If this is null 536 * @param {string} iconURL The url for the login status icon. If this is null
537 then the login status icon is hidden. 537 then the login status icon is hidden.
538 * @param {boolean} isUserSignedIn Indicates if the user is signed in or not. 538 * @param {boolean} isUserSignedIn Indicates if the user is signed in or not.
539 */ 539 */
540 function updateLogin(loginHeader, loginSubHeader, iconURL, isUserSignedIn) { 540 function updateLogin(loginHeader, loginSubHeader, iconURL, isUserSignedIn) {
541 /** @const */ var showLogin = loginHeader || loginSubHeader; 541 /** @const */ var showLogin = loginHeader || loginSubHeader;
542 542
543 $('login-container').hidden = !showLogin; 543 $('login-container').hidden = !showLogin;
544 $('login-container').classList.toggle('signed-in', isUserSignedIn);
544 $('card-slider-frame').classList.toggle('showing-login-area', !!showLogin); 545 $('card-slider-frame').classList.toggle('showing-login-area', !!showLogin);
545 546
546 if (showLogin) { 547 if (showLogin) {
547 // TODO(dbeam): we should use .textContent instead to mitigate XSS. 548 // TODO(dbeam): we should use .textContent instead to mitigate XSS.
548 $('login-status-header').innerHTML = loginHeader; 549 $('login-status-header').innerHTML = loginHeader;
549 $('login-status-sub-header').innerHTML = loginSubHeader; 550 $('login-status-sub-header').innerHTML = loginSubHeader;
550 551
551 var headerContainer = $('login-status-header-container'); 552 var headerContainer = $('login-status-header-container');
552 headerContainer.classList.toggle('login-status-icon', !!iconURL); 553 headerContainer.classList.toggle('login-status-icon', !!iconURL);
553 headerContainer.style.backgroundImage = iconURL ? url(iconURL) : 'none'; 554 headerContainer.style.backgroundImage = iconURL ? url(iconURL) : 'none';
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 setFaviconDominantColor: setFaviconDominantColor, 715 setFaviconDominantColor: setFaviconDominantColor,
715 showNotification: showNotification, 716 showNotification: showNotification,
716 themeChanged: themeChanged, 717 themeChanged: themeChanged,
717 updateLogin: updateLogin 718 updateLogin: updateLogin
718 }; 719 };
719 }); 720 });
720 721
721 document.addEventListener('DOMContentLoaded', ntp.onLoad); 722 document.addEventListener('DOMContentLoaded', ntp.onLoad);
722 723
723 var toCssPx = cr.ui.toCssPx; 724 var toCssPx = cr.ui.toCssPx;
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698