| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Enumeration of possible states during pairing. The value associated with | 6 * Enumeration of possible states during pairing. The value associated with |
| 7 * each state maps to a localized string in the global variable | 7 * each state maps to a localized string in the global variable |
| 8 * |loadTimeData|. | 8 * |loadTimeData|. |
| 9 * @enum {string} | 9 * @enum {string} |
| 10 */ | 10 */ |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 break; | 555 break; |
| 556 case chrome.bluetoothPrivate.ConnectResultType.AUTH_REJECTED: | 556 case chrome.bluetoothPrivate.ConnectResultType.AUTH_REJECTED: |
| 557 message = 'bluetoothConnectAuthRejected'; | 557 message = 'bluetoothConnectAuthRejected'; |
| 558 break; | 558 break; |
| 559 case chrome.bluetoothPrivate.ConnectResultType.AUTH_TIMEOUT: | 559 case chrome.bluetoothPrivate.ConnectResultType.AUTH_TIMEOUT: |
| 560 message = 'bluetoothConnectAuthTimeout'; | 560 message = 'bluetoothConnectAuthTimeout'; |
| 561 break; | 561 break; |
| 562 case chrome.bluetoothPrivate.ConnectResultType.UNSUPPORTED_DEVICE: | 562 case chrome.bluetoothPrivate.ConnectResultType.UNSUPPORTED_DEVICE: |
| 563 message = 'bluetoothConnectUnsupportedDevice'; | 563 message = 'bluetoothConnectUnsupportedDevice'; |
| 564 break; | 564 break; |
| 565 case chrome.bluetoothPrivate.ConnectResultType.ATTRIBUTE_LENGTH_INVALID: | |
| 566 message = 'bluetoothConnectAttributeLengthInvalid'; | |
| 567 break; | |
| 568 case chrome.bluetoothPrivate.ConnectResultType.CONNECTION_CONGESTED: | |
| 569 message = 'bluetoothConnectConnectionCongested'; | |
| 570 break; | |
| 571 case chrome.bluetoothPrivate.ConnectResultType.INSUFFICIENT_ENCRYPTION: | |
| 572 message = 'bluetoothConnectInsufficientEncryption'; | |
| 573 break; | |
| 574 case chrome.bluetoothPrivate.ConnectResultType.OFFSET_INVALID: | |
| 575 message = 'bluetoothConnectOffsetInvalid'; | |
| 576 break; | |
| 577 case chrome.bluetoothPrivate.ConnectResultType.READ_NOT_PERMITTED: | |
| 578 message = 'bluetoothConnectReadNotPermitted'; | |
| 579 break; | |
| 580 case chrome.bluetoothPrivate.ConnectResultType.REQUEST_NOT_SUPPORTED: | |
| 581 message = 'bluetoothConnectRequestNotSupported'; | |
| 582 break; | |
| 583 case chrome.bluetoothPrivate.ConnectResultType.WRITE_NOT_PERMITTED: | |
| 584 message = 'bluetoothConnectWriteNotPermitted'; | |
| 585 break; | |
| 586 } | 565 } |
| 587 if (message) | 566 if (message) |
| 588 BluetoothPairing.showMessage({message: message, address: address}); | 567 BluetoothPairing.showMessage({message: message, address: address}); |
| 589 }; | 568 }; |
| 590 | 569 |
| 591 /** | 570 /** |
| 592 * Closes the Bluetooth pairing dialog. | 571 * Closes the Bluetooth pairing dialog. |
| 593 */ | 572 */ |
| 594 BluetoothPairing.dismissDialog = function() { | 573 BluetoothPairing.dismissDialog = function() { |
| 595 var overlay = PageManager.getTopmostVisiblePage(); | 574 var overlay = PageManager.getTopmostVisiblePage(); |
| 596 var dialog = BluetoothPairing.getInstance(); | 575 var dialog = BluetoothPairing.getInstance(); |
| 597 if (overlay == dialog && dialog.dismissible_) { | 576 if (overlay == dialog && dialog.dismissible_) { |
| 598 if (dialog.event_) | 577 if (dialog.event_) |
| 599 dialog.event_.pairing = BluetoothPairingEventType.DISMISSED; | 578 dialog.event_.pairing = BluetoothPairingEventType.DISMISSED; |
| 600 PageManager.closeOverlay(); | 579 PageManager.closeOverlay(); |
| 601 } | 580 } |
| 602 }; | 581 }; |
| 603 | 582 |
| 604 // Export | 583 // Export |
| 605 return { | 584 return { |
| 606 BluetoothPairing: BluetoothPairing | 585 BluetoothPairing: BluetoothPairing |
| 607 }; | 586 }; |
| 608 }); | 587 }); |
| OLD | NEW |