chromium/extensions/browser/image_loader.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_BROWSER_IMAGE_LOADER_H_
#define EXTENSIONS_BROWSER_IMAGE_LOADER_H_

#include <set>

#include "base/functional/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "components/keyed_service/core/keyed_service.h"
#include "extensions/common/extension_resource.h"
#include "ui/gfx/geometry/size.h"

namespace content {
class BrowserContext;
}

namespace gfx {
class Image;
class ImageFamily;
}

namespace extensions {

class Extension;

ImageLoaderImageCallback;
ImageLoaderImageFamilyCallback;

// This class is responsible for asynchronously loading extension images and
// calling a callback when an image is loaded.
// The views need to load their icons asynchronously might be deleted before
// the images have loaded. If you pass your callback using a weak_ptr, this
// will make sure the callback won't be called after the view is deleted.
class ImageLoader : public KeyedService {};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_IMAGE_LOADER_H_