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

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

Issue 18593003: Disable mouse-focus of buttons in some WebUI pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a public function to FocusManager Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/options/options.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 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 chrome.send('notificationPromoViewed'); 280 chrome.send('notificationPromoViewed');
281 } 281 }
282 282
283 cr.dispatchSimpleEvent(document, 'ntpLoaded', true, true); 283 cr.dispatchSimpleEvent(document, 'ntpLoaded', true, true);
284 document.documentElement.classList.remove('starting-up'); 284 document.documentElement.classList.remove('starting-up');
285 285
286 startTime = Date.now(); 286 startTime = Date.now();
287 }); 287 });
288 288
289 preventDefaultOnPoundLinkClicks(); // From webui/js/util.js. 289 preventDefaultOnPoundLinkClicks(); // From webui/js/util.js.
290 cr.ui.FocusManager.disableMouseFocusOnButtons();
290 } 291 }
291 292
292 /** 293 /**
293 * Launches the chrome web store app with the chrome-ntp-launcher 294 * Launches the chrome web store app with the chrome-ntp-launcher
294 * source. 295 * source.
295 * @param {Event} e The click event. 296 * @param {Event} e The click event.
296 */ 297 */
297 function onChromeWebStoreButtonClick(e) { 298 function onChromeWebStoreButtonClick(e) {
298 chrome.send('recordAppLaunchByURL', 299 chrome.send('recordAppLaunchByURL',
299 [encodeURIComponent(this.href), 300 [encodeURIComponent(this.href),
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 setFaviconDominantColor: setFaviconDominantColor, 696 setFaviconDominantColor: setFaviconDominantColor,
696 showNotification: showNotification, 697 showNotification: showNotification,
697 themeChanged: themeChanged, 698 themeChanged: themeChanged,
698 updateLogin: updateLogin 699 updateLogin: updateLogin
699 }; 700 };
700 }); 701 });
701 702
702 document.addEventListener('DOMContentLoaded', ntp.onLoad); 703 document.addEventListener('DOMContentLoaded', ntp.onLoad);
703 704
704 var toCssPx = cr.ui.toCssPx; 705 var toCssPx = cr.ui.toCssPx;
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698