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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_pair_device_dialog.js

Issue 1920253002: Refactors parse_html_subset() into i18n_behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 6 * @fileoverview
7 * 'settings-bluetooth-pair-device-dialog' is the settings dialog for pairing 7 * 'settings-bluetooth-pair-device-dialog' is the settings dialog for pairing
8 * a bluetooth device. 8 * a bluetooth device.
9 */ 9 */
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * @private 65 * @private
66 */ 66 */
67 getMessage_: function(device, pairingEvent) { 67 getMessage_: function(device, pairingEvent) {
68 if (!device) 68 if (!device)
69 return ''; 69 return '';
70 var message; 70 var message;
71 if (!pairingEvent) 71 if (!pairingEvent)
72 message = 'bluetoothStartConnecting'; 72 message = 'bluetoothStartConnecting';
73 else 73 else
74 message = this.getEventDesc_(pairingEvent.pairing); 74 message = this.getEventDesc_(pairingEvent.pairing);
75 return this.i18n(message, device.name); 75 return this.i18n(message, [device.name]);
76 }, 76 },
77 77
78 /** 78 /**
79 * @param {?chrome.bluetoothPrivate.PairingEvent} pairingEvent 79 * @param {?chrome.bluetoothPrivate.PairingEvent} pairingEvent
80 * @return {boolean} 80 * @return {boolean}
81 * @private 81 * @private
82 */ 82 */
83 showEnterPincode_: function(pairingEvent) { 83 showEnterPincode_: function(pairingEvent) {
84 return !!pairingEvent && 84 return !!pairingEvent &&
85 pairingEvent.pairing == PairingEventType.REQUEST_PINCODE; 85 pairingEvent.pairing == PairingEventType.REQUEST_PINCODE;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 var lastKey = this.digits.length; // 6 259 var lastKey = this.digits.length; // 6
260 if ((index == -1 && enteredKey > lastKey) || (index + 1 == enteredKey)) 260 if ((index == -1 && enteredKey > lastKey) || (index + 1 == enteredKey))
261 cssClass += ' next'; 261 cssClass += ' next';
262 else if (index > enteredKey) 262 else if (index > enteredKey)
263 cssClass += ' untyped'; 263 cssClass += ' untyped';
264 } 264 }
265 return cssClass; 265 return cssClass;
266 }, 266 },
267 }); 267 });
268 })(); 268 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698