blob: 62f4a269a6d138d86a3842d3c018ee1f774a112a [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/browser/contacts_picker_properties_requested.h"
#include "third_party/blink/public/mojom/contacts/contacts_manager.mojom.h"
namespace content {
class ContactsProvider {
using ContactsSelectedCallback = base::OnceCallback<void(
base::Optional<std::vector<blink::mojom::ContactInfoPtr>> contacts,
int percentage_shared,
ContactsPickerPropertiesRequested properties_requested)>;
ContactsProvider() = default;
virtual ~ContactsProvider() = default;
// Launches the Contacts Picker Dialog and waits for the results to come back.
// |callback| is called with the contacts list and share statistics, once the
// operation finishes. See above for details.
virtual void Select(bool multiple,
bool include_names,
bool include_emails,
bool include_tel,
ContactsSelectedCallback callback) = 0;
} // namespace content