| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.exportPath('settings'); | 5 cr.exportPath('settings'); |
| 6 | 6 |
| 7 (function() { | 7 (function() { |
| 8 | 8 |
| 9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType; | 9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType; |
| 10 | 10 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 close: function() { this.$.dialog.close(); }, | 350 close: function() { this.$.dialog.close(); }, |
| 351 | 351 |
| 352 /** @private */ | 352 /** @private */ |
| 353 deviceListChanged_: function(e) { this.$.dialog.notifyResize(); }, | 353 deviceListChanged_: function(e) { this.$.dialog.notifyResize(); }, |
| 354 | 354 |
| 355 /** | 355 /** |
| 356 * @param {string} dialogId | 356 * @param {string} dialogId |
| 357 * @return {string} The title of for that |dialogId|. | 357 * @return {string} The title of for that |dialogId|. |
| 358 */ | 358 */ |
| 359 getTitle_: function(dialogId) { | 359 getTitle_: function(dialogId) { |
| 360 return this.i18n( | 360 if (dialogId == 'addDevice') |
| 361 dialogId == 'addDevice' ? 'bluetoothAddDevicePageTitle' : | 361 return this.i18n('bluetoothAddDevicePageTitle'); |
| 362 'bluetoothPairDevicePageTitle'); | 362 // Use the 'pair' title for the pairing dialog and error dialog. |
| 363 return this.i18n('bluetoothPairDevicePageTitle'); |
| 363 }, | 364 }, |
| 364 | 365 |
| 365 /** | 366 /** |
| 366 * @param {string} currentDialogType | 367 * @param {string} currentDialogType |
| 367 * @param {string} wantedDialogType | 368 * @param {string} wantedDialogType |
| 368 * @return {boolean} | 369 * @return {boolean} |
| 369 * @private | 370 * @private |
| 370 */ | 371 */ |
| 371 isDialogType_: function(currentDialogType, wantedDialogType) { | 372 isDialogType_: function(currentDialogType, wantedDialogType) { |
| 372 return currentDialogType == wantedDialogType; | 373 return currentDialogType == wantedDialogType; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 384 onIronOverlayCanceled_: function() { | 385 onIronOverlayCanceled_: function() { |
| 385 if (this.dialogId == 'pairDevice') | 386 if (this.dialogId == 'pairDevice') |
| 386 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); | 387 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); |
| 387 }, | 388 }, |
| 388 | 389 |
| 389 /** @private */ | 390 /** @private */ |
| 390 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); }, | 391 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); }, |
| 391 }); | 392 }); |
| 392 | 393 |
| 393 })(); | 394 })(); |
| OLD | NEW |