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

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

Issue 1119163003: Save large icons to a new LARGE_ICON type Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix try bots Created 5 years, 7 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 "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/image/image.h" 11 #include "ui/gfx/image/image.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace favicon_base { 14 namespace favicon_base {
15 15
16 struct FallbackIconStyle; 16 struct FallbackIconStyle;
17 17
18 typedef int64 FaviconID; 18 typedef int64 FaviconID;
19 19
20 // Defines the icon types. They are also stored in icon_type field of favicons 20 // Defines the icon types. They are also stored in icon_type field of favicons
21 // table. 21 // table.
22 // The values of the IconTypes are used to select the priority in which favicon 22 // The values of the IconTypes are used to select the priority in which favicon
23 // data is returned in HistoryBackend and ThumbnailDatabase. Data for the 23 // data is returned in HistoryBackend and ThumbnailDatabase. Data for the
24 // largest IconType takes priority if data for multiple IconTypes is available. 24 // largest IconType takes priority if data for multiple IconTypes is available.
25 enum IconType { 25 enum IconType {
huangs 2015/05/04 05:17:30 Need more comment here regarding real (?) icon typ
Roger McFarlane (Chromium) 2015/05/04 18:48:15 Done.
26 INVALID_ICON = 0x0, 26 INVALID_ICON = 0x0,
27 FAVICON = 1 << 0, 27 FAVICON = 1 << 0,
28 TOUCH_ICON = 1 << 1, 28 TOUCH_ICON = 1 << 1,
29 TOUCH_PRECOMPOSED_ICON = 1 << 2 29 TOUCH_PRECOMPOSED_ICON = 1 << 2,
30 LARGE_ICON = 1 << 3
30 }; 31 };
31 32
32 // Defines a gfx::Image of size desired_size_in_dip composed of image 33 // Defines a gfx::Image of size desired_size_in_dip composed of image
33 // representations for each of the desired scale factors. 34 // representations for each of the desired scale factors.
34 struct FaviconImageResult { 35 struct FaviconImageResult {
35 FaviconImageResult(); 36 FaviconImageResult();
36 ~FaviconImageResult(); 37 ~FaviconImageResult();
37 38
38 // The resulting image. 39 // The resulting image.
39 gfx::Image image; 40 gfx::Image image;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 FaviconRawBitmapResult bitmap; 92 FaviconRawBitmapResult bitmap;
92 93
93 // The fallback icon style if a sufficiently large icon isn't available. This 94 // The fallback icon style if a sufficiently large icon isn't available. This
94 // uses the dominant color of a smaller icon as the background if available. 95 // uses the dominant color of a smaller icon as the background if available.
95 scoped_ptr<FallbackIconStyle> fallback_icon_style; 96 scoped_ptr<FallbackIconStyle> fallback_icon_style;
96 }; 97 };
97 98
98 } // namespace favicon_base 99 } // namespace favicon_base
99 100
100 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 101 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698