// 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 COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ #include <stdint.h> #include <memory> #include "base/containers/flat_set.h" #include "base/memory/ref_counted_memory.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image.h" #include "url/gurl.h" namespace favicon_base { struct FallbackIconStyle; FaviconID; // Defines the icon types. // // IMPORTANT: these values must stay in sync with the FaviconType enum in // tools/metrics/histograms/enums.xml. // When you update the types please also check if it needs to be reflected in // blink::mojom::FaviconIconType enums // // The values of the IconTypes are used to select the priority in which favicon // data is returned. // // A Java counterpart will be generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.favicon enum class IconType { … }; IconTypeSet; // Defines a gfx::Image of size desired_size_in_dip composed of image // representations for each of the desired scale factors. struct FaviconImageResult { … }; // Defines a favicon bitmap which best matches the desired DIP size and one of // the desired scale factors. struct FaviconRawBitmapResult { … }; // Define type with same structure as FaviconRawBitmapResult for passing data to // HistoryBackend::SetFavicons(). FaviconRawBitmapData; // Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains // either the bitmap data if the favicon database has a sufficiently large // favicon bitmap and the style of the fallback icon otherwise. struct LargeIconResult { … }; // Result returned by LargeIconService::GetLargeIconImageOrFallbackStyle(). // Contains either the gfx::Image if the favicon database has a sufficiently // large favicon bitmap and the style of the fallback icon otherwise. struct LargeIconImageResult { … }; // Enumeration listing all possible outcomes for fetch attempts from Google // favicon server. Used for UMA enum GoogleFaviconServerRequestStatus, so do not // change existing values. Insert new values at the end, and update the // histogram definition. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.favicon enum class GoogleFaviconServerRequestStatus { … }; } // namespace favicon_base #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_