Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: components/favicon_base/favicon_types.h

Issue 2891333002: Introduce dedicated enum value for icons from Web Manifests (Closed)
Patch Set: Put browsertest behind #if. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
6 #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 6 #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/ref_counted_memory.h" 12 #include "base/memory/ref_counted_memory.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/image/image.h" 14 #include "ui/gfx/image/image.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace favicon_base { 17 namespace favicon_base {
18 18
19 struct FallbackIconStyle; 19 struct FallbackIconStyle;
20 20
21 typedef int64_t FaviconID; 21 typedef int64_t FaviconID;
22 22
23 // Defines the icon types. They are also stored in icon_type field of favicons 23 // Defines the icon types. They are also stored in icon_type field of favicons
24 // table. 24 // table.
25 // The values of the IconTypes are used to select the priority in which favicon 25 // The values of the IconTypes are used to select the priority in which favicon
26 // data is returned in HistoryBackend and ThumbnailDatabase. Data for the 26 // data is returned in HistoryBackend and ThumbnailDatabase.
27 // largest IconType takes priority if data for multiple IconTypes is available.
28 enum IconType { 27 enum IconType {
29 INVALID_ICON = 0x0, 28 INVALID_ICON = 0x0,
30 FAVICON = 1 << 0, 29 FAVICON = 1 << 0,
31 TOUCH_ICON = 1 << 1, 30 TOUCH_ICON = 1 << 1,
32 TOUCH_PRECOMPOSED_ICON = 1 << 2 31 TOUCH_PRECOMPOSED_ICON = 1 << 2,
32 WEB_MANIFEST_ICON = 1 << 3,
33 }; 33 };
34 34
35 // Defines a gfx::Image of size desired_size_in_dip composed of image 35 // Defines a gfx::Image of size desired_size_in_dip composed of image
36 // representations for each of the desired scale factors. 36 // representations for each of the desired scale factors.
37 struct FaviconImageResult { 37 struct FaviconImageResult {
38 FaviconImageResult(); 38 FaviconImageResult();
39 ~FaviconImageResult(); 39 ~FaviconImageResult();
40 40
41 // The resulting image. 41 // The resulting image.
42 gfx::Image image; 42 gfx::Image image;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 gfx::Image image; 115 gfx::Image image;
116 116
117 // The fallback icon style if a sufficiently large icon isn't available. This 117 // The fallback icon style if a sufficiently large icon isn't available. This
118 // uses the dominant color of a smaller icon as the background if available. 118 // uses the dominant color of a smaller icon as the background if available.
119 std::unique_ptr<FallbackIconStyle> fallback_icon_style; 119 std::unique_ptr<FallbackIconStyle> fallback_icon_style;
120 }; 120 };
121 121
122 } // namespace favicon_base 122 } // namespace favicon_base
123 123
124 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 124 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
OLDNEW
« no previous file with comments | « components/favicon/ios/favicon_url_util.cc ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698