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

Side by Side Diff: chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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('wallpapers', function() { 5 cr.define('wallpapers', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var Grid = cr.ui.Grid; 7 /** @const */ var Grid = cr.ui.Grid;
8 /** @const */ var GridItem = cr.ui.GridItem; 8 /** @const */ var GridItem = cr.ui.GridItem;
9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController;
10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 /** @override */ 202 /** @override */
203 getIndexAfter: function(index) { 203 getIndexAfter: function(index) {
204 var result = 204 var result =
205 GridSelectionController.prototype.getIndexAfter.call(this, index); 205 GridSelectionController.prototype.getIndexAfter.call(this, index);
206 return result == -1 ? this.getFirstIndex() : result; 206 return result == -1 ? this.getFirstIndex() : result;
207 }, 207 },
208 208
209 /** @override */ 209 /** @override */
210 handleKeyDown: function(e) { 210 handleKeyDown: function(e) {
211 if (e.keyIdentifier == 'Enter') 211 if (e.key == 'Enter')
212 cr.dispatchSimpleEvent(this.grid_, 'activate'); 212 cr.dispatchSimpleEvent(this.grid_, 'activate');
213 else 213 else
214 GridSelectionController.prototype.handleKeyDown.call(this, e); 214 GridSelectionController.prototype.handleKeyDown.call(this, e);
215 }, 215 },
216 }; 216 };
217 217
218 /** 218 /**
219 * Creates a new user images grid element. 219 * Creates a new user images grid element.
220 * @param {Object=} opt_propertyBag Optional properties. 220 * @param {Object=} opt_propertyBag Optional properties.
221 * @constructor 221 * @constructor
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // The active thumbnail maybe deleted in the above redraw(). Sets it again 436 // The active thumbnail maybe deleted in the above redraw(). Sets it again
437 // to make sure checkmark shows correctly. 437 // to make sure checkmark shows correctly.
438 this.updateActiveThumb_(); 438 this.updateActiveThumb_();
439 } 439 }
440 }; 440 };
441 441
442 return { 442 return {
443 WallpaperThumbnailsGrid: WallpaperThumbnailsGrid 443 WallpaperThumbnailsGrid: WallpaperThumbnailsGrid
444 }; 444 };
445 }); 445 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/user_images_grid.js ('k') | chrome/browser/resources/extensions/chromeos/kiosk_apps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698