blob: f3ab4b9cb631615b5e9067bdf2d6eaac57e1b16c [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_IMPL_H_
#define IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_IMPL_H_
#include "components/autofill/core/browser/ui/autofill_image_fetcher.h"
#include "components/keyed_service/core/keyed_service.h"
namespace network {
class SharedURLLoaderFactory;
}
namespace autofill {
// iOS implementation of AutofillImageFetcher, which provides a fetcher for
// custom credit card icons.
class AutofillImageFetcherImpl : public AutofillImageFetcher,
public KeyedService {
public:
AutofillImageFetcherImpl(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);
~AutofillImageFetcherImpl() override;
// AutofillImageFetcher:
image_fetcher::ImageFetcher* GetImageFetcher() override;
base::WeakPtr<AutofillImageFetcher> GetWeakPtr() override;
private:
std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher_;
base::WeakPtrFactory<AutofillImageFetcherImpl> weak_ptr_factory_{this};
};
} // namespace autofill
#endif // IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_IMPL_H_