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

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

Issue 2337513002: Only handle click actions for left & middle buttons (Closed)
Patch Set: vulanize the resources Created 4 years, 3 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/md_downloads/crisper.js ('k') | ui/webui/resources/js/util.js » ('j') | 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 4 6 * @fileoverview New tab page 4
7 * This is the main code for a previous version of the Chrome NTP ("NTP4"). 7 * This is the main code for a previous version of the Chrome NTP ("NTP4").
8 * Some parts of this are still used for the chrome://apps page. 8 * Some parts of this are still used for the chrome://apps page.
9 */ 9 */
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 startTime = Date.now(); 153 startTime = Date.now();
154 }); 154 });
155 } 155 }
156 156
157 /** 157 /**
158 * Launches the chrome web store app with the chrome-ntp-launcher 158 * Launches the chrome web store app with the chrome-ntp-launcher
159 * source. 159 * source.
160 * @param {Event} e The click/auxclick event. 160 * @param {Event} e The click/auxclick event.
161 */ 161 */
162 function onChromeWebStoreButtonClick(e) { 162 function onChromeWebStoreButtonClick(e) {
163 if (e.button > 1)
164 return; // Ignore buttons other than left and middle.
163 chrome.send('recordAppLaunchByURL', 165 chrome.send('recordAppLaunchByURL',
164 [encodeURIComponent(this.href), 166 [encodeURIComponent(this.href),
165 ntp.APP_LAUNCH.NTP_WEBSTORE_FOOTER]); 167 ntp.APP_LAUNCH.NTP_WEBSTORE_FOOTER]);
166 } 168 }
167 169
168 /** 170 /**
169 * The number of sections to wait on. 171 * The number of sections to wait on.
170 * @type {number} 172 * @type {number}
171 */ 173 */
172 var sectionsToWaitFor = -1; 174 var sectionsToWaitFor = -1;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 setBookmarkBarAttached: setBookmarkBarAttached, 450 setBookmarkBarAttached: setBookmarkBarAttached,
449 setFaviconDominantColor: setFaviconDominantColor, 451 setFaviconDominantColor: setFaviconDominantColor,
450 themeChanged: themeChanged, 452 themeChanged: themeChanged,
451 updateLogin: updateLogin 453 updateLogin: updateLogin
452 }; 454 };
453 }); 455 });
454 456
455 document.addEventListener('DOMContentLoaded', ntp.onLoad); 457 document.addEventListener('DOMContentLoaded', ntp.onLoad);
456 458
457 var toCssPx = cr.ui.toCssPx; 459 var toCssPx = cr.ui.toCssPx;
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | ui/webui/resources/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698