#include "services/on_device_model/ml/on_device_model_internal.h"
#include <memory>
#include "base/no_destructor.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/on_device_model/ml/chrome_ml.h"
#include "services/on_device_model/ml/gpu_blocklist.h"
#include "services/on_device_model/ml/on_device_model_executor.h"
#include "services/on_device_model/ml/utils.h"
#include "services/on_device_model/public/cpp/model_assets.h"
namespace ml {
base::expected<std::unique_ptr<OnDeviceModelExecutor>,
on_device_model::mojom::LoadModelResult>
OnDeviceModelInternalImpl::CreateModel(
on_device_model::mojom::LoadModelParamsPtr params,
base::OnceClosure on_complete) const { … }
on_device_model::mojom::PerformanceClass
OnDeviceModelInternalImpl::GetEstimatedPerformanceClass() const { … }
OnDeviceModelInternalImpl::OnDeviceModelInternalImpl(const ChromeML* chrome_ml,
GpuBlocklist gpu_blocklist)
: … { … }
OnDeviceModelInternalImpl::~OnDeviceModelInternalImpl() = default;
COMPONENT_EXPORT(ON_DEVICE_MODEL_ML)
const OnDeviceModelInternalImpl* GetOnDeviceModelInternalImpl() { … }
COMPONENT_EXPORT(ON_DEVICE_MODEL_ML)
const OnDeviceModelInternalImpl*
GetOnDeviceModelInternalImplWithoutGpuBlocklistForTesting() { … }
}