blob: f16a8e6d4b2fa0f0093354fe2a4365c00610830a [file] [log] [blame]
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* JavaScript hooks into the native WebUI handler to pass Contacts to the
* Contacts tab.
*/
export class NearbyContactBrowserProxy {
/** Initializes web contents in the WebUI handler. */
initialize() {
chrome.send('initializeContacts');
}
/** Downloads the user's contact list from the Nearby Share server. */
downloadContacts() {
chrome.send('downloadContacts');
}
/** @return {!NearbyContactBrowserProxy} */
static getInstance() {
return instance || (instance = new NearbyContactBrowserProxy());
}
}
/** @type {?NearbyContactBrowserProxy} */
let instance = null;