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

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

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build Created 4 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 unified diff | Download patch
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 cr.define('ntp', function() { 5 cr.define('ntp', function() {
6 'use strict'; 6 'use strict';
7 7
8 var APP_LAUNCH = { 8 var APP_LAUNCH = {
9 // The histogram buckets (keep in sync with extension_constants.h). 9 // The histogram buckets (keep in sync with extension_constants.h).
10 NTP_APPS_MAXIMIZED: 0, 10 NTP_APPS_MAXIMIZED: 0,
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // Don't allow the click to trigger a link or anything 406 // Don't allow the click to trigger a link or anything
407 e.preventDefault(); 407 e.preventDefault();
408 }, 408 },
409 409
410 /** 410 /**
411 * Invoked when the user presses a key while the app is focused. 411 * Invoked when the user presses a key while the app is focused.
412 * @param {Event} e The key event. 412 * @param {Event} e The key event.
413 * @private 413 * @private
414 */ 414 */
415 onKeydown_: function(e) { 415 onKeydown_: function(e) {
416 if (e.keyIdentifier == 'Enter') { 416 if (e.key == 'Enter') {
417 chrome.send('launchApp', 417 chrome.send('launchApp',
418 [this.appId, APP_LAUNCH.NTP_APPS_MAXIMIZED, '', 418 [this.appId, APP_LAUNCH.NTP_APPS_MAXIMIZED, '',
419 0, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey]); 419 0, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey]);
420 e.preventDefault(); 420 e.preventDefault();
421 e.stopPropagation(); 421 e.stopPropagation();
422 } 422 }
423 }, 423 },
424 424
425 /** 425 /**
426 * Adds a node to the list of targets that will launch the app. This list 426 * Adds a node to the list of targets that will launch the app. This list
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]); 771 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]);
772 } 772 }
773 773
774 return { 774 return {
775 APP_LAUNCH: APP_LAUNCH, 775 APP_LAUNCH: APP_LAUNCH,
776 App: App, 776 App: App,
777 AppsPage: AppsPage, 777 AppsPage: AppsPage,
778 launchAppAfterEnable: launchAppAfterEnable, 778 launchAppAfterEnable: launchAppAfterEnable,
779 }; 779 };
780 }); 780 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | chrome/browser/resources/ntp4/dot_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698