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 return this.i18n('bluetoothPairDevicePageTitle'); |
Dan Beam
2016/07/13 01:35:11
what's the functional difference here?
stevenjb
2016/07/13 17:26:43
None, it just seems more clear to me now that ther
| |
363 }, | 363 }, |
364 | 364 |
365 /** | 365 /** |
366 * @param {string} currentDialogType | 366 * @param {string} currentDialogType |
367 * @param {string} wantedDialogType | 367 * @param {string} wantedDialogType |
368 * @return {boolean} | 368 * @return {boolean} |
369 * @private | 369 * @private |
370 */ | 370 */ |
371 isDialogType_: function(currentDialogType, wantedDialogType) { | 371 isDialogType_: function(currentDialogType, wantedDialogType) { |
372 return currentDialogType == wantedDialogType; | 372 return currentDialogType == wantedDialogType; |
(...skipping 11 matching lines...) Expand all Loading... | |
384 onIronOverlayCanceled_: function() { | 384 onIronOverlayCanceled_: function() { |
385 if (this.dialogId == 'pairDevice') | 385 if (this.dialogId == 'pairDevice') |
386 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); | 386 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); |
387 }, | 387 }, |
388 | 388 |
389 /** @private */ | 389 /** @private */ |
390 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); }, | 390 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); }, |
391 }); | 391 }); |
392 | 392 |
393 })(); | 393 })(); |
OLD | NEW |