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

Side by Side Diff: chrome/browser/resources/options/language_options.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 // TODO(kochi): Generalize the notification as a component and put it 5 // TODO(kochi): Generalize the notification as a component and put it
6 // in js/cr/ui/notification.js . 6 // in js/cr/ui/notification.js .
7 7
8 cr.define('options', function() { 8 cr.define('options', function() {
9 /** @const */ var Page = cr.ui.pageManager.Page; 9 /** @const */ var Page = cr.ui.pageManager.Page;
10 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 10 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 1256
1257 function delayedHide() { 1257 function delayedHide() {
1258 this.notificationTimeout_ = window.setTimeout(hide, delay); 1258 this.notificationTimeout_ = window.setTimeout(hide, delay);
1259 } 1259 }
1260 1260
1261 notificationElement.firstElementChild.textContent = text; 1261 notificationElement.firstElementChild.textContent = text;
1262 actionLink.textContent = actionText; 1262 actionLink.textContent = actionText;
1263 1263
1264 actionLink.onclick = hide; 1264 actionLink.onclick = hide;
1265 actionLink.onkeydown = function(e) { 1265 actionLink.onkeydown = function(e) {
1266 if (e.keyIdentifier == 'Enter') { 1266 if (e.key == 'Enter') {
1267 hide(); 1267 hide();
1268 } 1268 }
1269 }; 1269 };
1270 notificationElement.onmouseover = show; 1270 notificationElement.onmouseover = show;
1271 notificationElement.onmouseout = delayedHide; 1271 notificationElement.onmouseout = delayedHide;
1272 actionLink.onfocus = show; 1272 actionLink.onfocus = show;
1273 actionLink.onblur = delayedHide; 1273 actionLink.onblur = delayedHide;
1274 // Enable tabbing to the link now that it is shown. 1274 // Enable tabbing to the link now that it is shown.
1275 actionLink.tabIndex = 0; 1275 actionLink.tabIndex = 0;
1276 1276
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 1437
1438 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) { 1438 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) {
1439 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode); 1439 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode);
1440 }; 1440 };
1441 1441
1442 // Export 1442 // Export
1443 return { 1443 return {
1444 LanguageOptions: LanguageOptions 1444 LanguageOptions: LanguageOptions
1445 }; 1445 };
1446 }); 1446 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698