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
3 // found in the LICENSE file.
4 function recordDevice(device) {
5 console.log("recordDevice");
8 chrome.app.runtime.onLaunched.addListener(function() {
9 chrome.app.window.create('window.html', {'width': 400,'height': 500});
10 chrome.bluetooth.startDiscovery({deviceCallback: recordDevice});
11 chrome.bluetooth.stopDiscovery();
14 chrome.runtime.onMessageExternal.addListener(
15 function(message, sender, response) {
19 chrome.runtime.onConnectExternal.addListener(function(port) {
20 console.log("connected");