blob: 6bf0ea11ab7fe98ed569e877b4a669700258ca9b [file] [log] [blame]
// Copyright 2020 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 "chromeos/services/libassistant/libassistant_service.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/logging.h"
#include "chromeos/services/libassistant/service_controller.h"
namespace chromeos {
namespace libassistant {
LibassistantService::LibassistantService(
mojo::PendingReceiver<mojom::LibassistantService> receiver,
assistant_client::PlatformApi* platform_api,
assistant::AssistantManagerServiceDelegate* delegate)
: receiver_(this, std::move(receiver)),
service_controller_(
std::make_unique<ServiceController>(delegate, platform_api)) {}
LibassistantService::~LibassistantService() = default;
void LibassistantService::BindServiceController(
mojo::PendingReceiver<mojom::ServiceController> receiver) {
service_controller_->Bind(std::move(receiver));
}
} // namespace libassistant
} // namespace chromeos