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

Unified Diff: chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js

Issue 570503002: Compile chrome://settings, part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_4
Patch Set: fix asserts, rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
diff --git a/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js b/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
index 6a3fcfc5b3dbd2af9213b0b2ac617fc2a5c9cfc8..35c5b20e91d74703a294ebe3ca367ff0cd7be0c9 100644
--- a/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
+++ b/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
@@ -57,16 +57,7 @@ cr.define('options', function() {
/**
* Description of the bluetooth device.
- * @type {{name: string,
- * address: string,
- * paired: boolean,
- * connected: boolean,
- * connecting: boolean,
- * connectable: boolean,
- * pairing: (string|undefined),
- * passkey: (number|undefined),
- * pincode: (string|undefined),
- * entered: (number|undefined)}}
+ * @type {?BluetoothDevice}
* @private
*/
device_: null,
@@ -170,11 +161,11 @@ cr.define('options', function() {
* @param {Object} device Description of the bluetooth device.
*/
update: function(device) {
- this.device_ = {};
+ this.device_ = /** @type {BluetoothDevice} */({});
for (var key in device)
this.device_[key] = device[key];
// Update the pairing instructions.
- var instructionsEl = $('bluetooth-pairing-instructions');
+ var instructionsEl = assert($('bluetooth-pairing-instructions'));
this.clearElement_(instructionsEl);
this.dismissible_ = ('dismissible' in device) ?
device.dismissible : true;
@@ -228,7 +219,7 @@ cr.define('options', function() {
/**
* Handles the ENTER key for the passkey or pincode entry field.
- * @return {Event} a keydown event.
+ * @param {Event} event A keydown event.
* @private
*/
keyDownEventHandler_: function(event) {
@@ -275,7 +266,7 @@ cr.define('options', function() {
* @param {string} key Passkey or PIN to display.
*/
updatePasskey_: function(key) {
- var passkeyEl = $('bluetooth-pairing-passkey-display');
+ var passkeyEl = assert($('bluetooth-pairing-passkey-display'));
var keyClass = (this.device_.pairing == PAIRING.REMOTE_PASSKEY ||
this.device_.pairing == PAIRING.REMOTE_PIN_CODE) ?
'bluetooth-keyboard-button' : 'bluetooth-passkey-char';

Powered by Google App Engine
This is Rietveld 408576698