| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 var OptionsPage = options.OptionsPage; | 5 var OptionsPage = options.OptionsPage; |
| 6 var BluetoothPairing = options.BluetoothPairing; | 6 var BluetoothPairing = options.BluetoothPairing; |
| 7 var FakeBluetoothOverlayParent = options.FakeBluetoothOverlayParent; | 7 var FakeBluetoothOverlayParent = options.FakeBluetoothOverlayParent; |
| 8 | 8 |
| 9 /** @override */ | 9 /** @override */ |
| 10 OptionsPage.closeOverlay = function() { | 10 OptionsPage.closeOverlay = function() { |
| 11 chrome.send('DialogClose'); | 11 chrome.send('dialogClose'); |
| 12 }; | 12 }; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * Listener for the |beforeunload| event. | 15 * Listener for the |beforeunload| event. |
| 16 */ | 16 */ |
| 17 window.onbeforeunload = function() { | 17 window.onbeforeunload = function() { |
| 18 OptionsPage.willClose(); | 18 OptionsPage.willClose(); |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 /** | 21 /** |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 var device = {}; | 51 var device = {}; |
| 52 var args = JSON.parse(chrome.getVariableValue('dialogArguments')); | 52 var args = JSON.parse(chrome.getVariableValue('dialogArguments')); |
| 53 device = args; | 53 device = args; |
| 54 device.pairing = 'bluetoothStartConnecting'; | 54 device.pairing = 'bluetoothStartConnecting'; |
| 55 BluetoothPairing.showDialog(device); | 55 BluetoothPairing.showDialog(device); |
| 56 chrome.send('updateBluetoothDevice', [device.address, 'connect']); | 56 chrome.send('updateBluetoothDevice', [device.address, 'connect']); |
| 57 } | 57 } |
| 58 | 58 |
| 59 document.addEventListener('DOMContentLoaded', load); | 59 document.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |