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

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

Issue 2784233003: [LargeIconService] Allow decoding of images in the service (Closed)
Patch Set: Peter's comments #4 Created 3 years, 8 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
« no previous file with comments | « components/favicon_base/favicon_callback.h ('k') | components/favicon_base/favicon_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // The bitmap from the favicon database if the database has a sufficiently 93 // The bitmap from the favicon database if the database has a sufficiently
94 // large one. 94 // large one.
95 FaviconRawBitmapResult bitmap; 95 FaviconRawBitmapResult bitmap;
96 96
97 // The fallback icon style if a sufficiently large icon isn't available. This 97 // The fallback icon style if a sufficiently large icon isn't available. This
98 // uses the dominant color of a smaller icon as the background if available. 98 // uses the dominant color of a smaller icon as the background if available.
99 std::unique_ptr<FallbackIconStyle> fallback_icon_style; 99 std::unique_ptr<FallbackIconStyle> fallback_icon_style;
100 }; 100 };
101 101
102 // Result returned by LargeIconService::GetLargeIconImageOrFallbackStyle().
103 // Contains either the gfx::Image if the favicon database has a sufficiently
104 // large favicon bitmap and the style of the fallback icon otherwise.
105 struct LargeIconImageResult {
106 explicit LargeIconImageResult(const gfx::Image& image_in);
107
108 // Takes ownership of |fallback_icon_style_in|.
109 explicit LargeIconImageResult(FallbackIconStyle* fallback_icon_style_in);
110
111 ~LargeIconImageResult();
112
113 // The image from the favicon database if the database has a sufficiently
114 // large one.
115 gfx::Image image;
116
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.
119 std::unique_ptr<FallbackIconStyle> fallback_icon_style;
120 };
121
102 } // namespace favicon_base 122 } // namespace favicon_base
103 123
104 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 124 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
OLDNEW
« no previous file with comments | « components/favicon_base/favicon_callback.h ('k') | components/favicon_base/favicon_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698