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

Side by Side Diff: chrome/browser/resources/chromeos/user_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) 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('options', function() { 5 cr.define('options', 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 /** @override */ 93 /** @override */
94 getIndexAfter: function(index) { 94 getIndexAfter: function(index) {
95 var result = 95 var result =
96 GridSelectionController.prototype.getIndexAfter.call(this, index); 96 GridSelectionController.prototype.getIndexAfter.call(this, index);
97 return result == -1 ? this.getFirstIndex() : result; 97 return result == -1 ? this.getFirstIndex() : result;
98 }, 98 },
99 99
100 /** @override */ 100 /** @override */
101 handleKeyDown: function(e) { 101 handleKeyDown: function(e) {
102 if (e.keyIdentifier == 'Enter') 102 if (e.key == 'Enter')
103 cr.dispatchSimpleEvent(this.grid_, 'activate'); 103 cr.dispatchSimpleEvent(this.grid_, 'activate');
104 else 104 else
105 GridSelectionController.prototype.handleKeyDown.call(this, e); 105 GridSelectionController.prototype.handleKeyDown.call(this, e);
106 } 106 }
107 }; 107 };
108 108
109 /** 109 /**
110 * Creates a new user images grid element. 110 * Creates a new user images grid element.
111 * @param {Object=} opt_propertyBag Optional properties. 111 * @param {Object=} opt_propertyBag Optional properties.
112 * @constructor 112 * @constructor
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 UserImagesGrid.ButtonImages = { 671 UserImagesGrid.ButtonImages = {
672 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO', 672 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO',
673 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE', 673 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE',
674 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING' 674 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING'
675 }; 675 };
676 676
677 return { 677 return {
678 UserImagesGrid: UserImagesGrid 678 UserImagesGrid: UserImagesGrid
679 }; 679 };
680 }); 680 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698