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

Unified Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp4/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 708f25627a92607d238a857374872ea7fd29fde5..8fdb477f1ff54fd1410bbf144f30064408607da5 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -58,16 +58,15 @@ cr.define('ntp', function() {
var pageSwitcherStart;
var pageSwitcherEnd;
if (loadTimeData.getValue('showApps')) {
- pageSwitcherStart = /** @type {!ntp.PageSwitcher} */(
+ pageSwitcherStart = /** @type {!ntp.PageSwitcher} */ (
getRequiredElement('page-switcher-start'));
- pageSwitcherEnd = /** @type {!ntp.PageSwitcher} */(
+ pageSwitcherEnd = /** @type {!ntp.PageSwitcher} */ (
getRequiredElement('page-switcher-end'));
}
- this.initialize(getRequiredElement('page-list'),
- getRequiredElement('dot-list'),
- getRequiredElement('card-slider-frame'),
- getRequiredElement('trash'),
- pageSwitcherStart, pageSwitcherEnd);
+ this.initialize(
+ getRequiredElement('page-list'), getRequiredElement('dot-list'),
+ getRequiredElement('card-slider-frame'), getRequiredElement('trash'),
+ pageSwitcherStart, pageSwitcherEnd);
}
// TODO(dbeam): NewTabView is now the only extender of PageListView; these
@@ -82,10 +81,13 @@ cr.define('ntp', function() {
if (loadTimeData.getBoolean('showApps')) {
sectionsToWaitFor++;
if (loadTimeData.getBoolean('showAppLauncherPromo')) {
- $('app-launcher-promo-close-button').addEventListener('click',
- function() { chrome.send('stopShowingAppLauncherPromo'); });
- $('apps-promo-learn-more').addEventListener('click',
- function() { chrome.send('onLearnMore'); });
+ $('app-launcher-promo-close-button')
+ .addEventListener('click', function() {
+ chrome.send('stopShowingAppLauncherPromo');
+ });
+ $('apps-promo-learn-more').addEventListener('click', function() {
+ chrome.send('onLearnMore');
+ });
}
}
measureNavDots();
@@ -101,10 +103,10 @@ cr.define('ntp', function() {
var webStoreLink = loadTimeData.getString('webStoreLink');
var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-launcher');
$('chrome-web-store-link').href = url;
- $('chrome-web-store-link').addEventListener('auxclick',
- onChromeWebStoreButtonClick);
- $('chrome-web-store-link').addEventListener('click',
- onChromeWebStoreButtonClick);
+ $('chrome-web-store-link')
+ .addEventListener('auxclick', onChromeWebStoreButtonClick);
+ $('chrome-web-store-link')
+ .addEventListener('click', onChromeWebStoreButtonClick);
}
// We need to wait for all the footer menu setup to be completed before
@@ -158,10 +160,10 @@ cr.define('ntp', function() {
*/
function onChromeWebStoreButtonClick(e) {
if (e.button > 1)
- return; // Ignore buttons other than left and middle.
- chrome.send('recordAppLaunchByURL',
- [encodeURIComponent(this.href),
- ntp.APP_LAUNCH.NTP_WEBSTORE_FOOTER]);
+ return; // Ignore buttons other than left and middle.
+ chrome.send(
+ 'recordAppLaunchByURL',
+ [encodeURIComponent(this.href), ntp.APP_LAUNCH.NTP_WEBSTORE_FOOTER]);
}
/**
@@ -302,8 +304,8 @@ cr.define('ntp', function() {
*/
function showSyncLoginUI(e) {
var rect = e.currentTarget.getBoundingClientRect();
- chrome.send('showSyncLoginUI',
- [rect.left, rect.top, rect.width, rect.height]);
+ chrome.send(
+ 'showSyncLoginUI', [rect.left, rect.top, rect.width, rect.height]);
}
/**

Powered by Google App Engine
This is Rietveld 408576698