large_favicon_provider_getter.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_FAVICON_CONTENT_LARGE_FAVICON_PROVIDER_GETTER_H_
  5. #define COMPONENTS_FAVICON_CONTENT_LARGE_FAVICON_PROVIDER_GETTER_H_
  6. #include "base/callback.h"
  7. namespace content {
  8. class BrowserContext;
  9. }
  10. namespace favicon {
  11. class LargeFaviconProvider;
  12. using LargeFaviconProviderGetter =
  13. base::RepeatingCallback<LargeFaviconProvider*(content::BrowserContext*)>;
  14. // Sets a callback that returns the LargeIconProvider for a given
  15. // BrowserContext. This allows code in //components, such as LargeIconBridge, to
  16. // obtain an implementation of LargeIconProvider even though the
  17. // implementation's factory is unique to each embedder.
  18. void SetLargeFaviconProviderGetter(const LargeFaviconProviderGetter& getter);
  19. LargeFaviconProvider* GetLargeFaviconProvider(content::BrowserContext* context);
  20. } // namespace favicon
  21. #endif // COMPONENTS_FAVICON_CONTENT_LARGE_FAVICON_PROVIDER_GETTER_H_