- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / activity_log_app / background.js
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");
6 }
7
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();
12 });
13
14 chrome.runtime.onMessageExternal.addListener(
15     function(message, sender, response) {
16   response();
17 });
18
19 chrome.runtime.onConnectExternal.addListener(function(port) {
20   console.log("connected");
21 });