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

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

Issue 1108833002: [Local NTP] Fix chrome://large-icon fallback when no favicon is found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring constructors. Created 5 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/core/large_icon_service.cc ('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 "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"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }; 72 };
73 73
74 // Define type with same structure as FaviconRawBitmapResult for passing data to 74 // Define type with same structure as FaviconRawBitmapResult for passing data to
75 // HistoryBackend::SetFavicons(). 75 // HistoryBackend::SetFavicons().
76 typedef FaviconRawBitmapResult FaviconRawBitmapData; 76 typedef FaviconRawBitmapResult FaviconRawBitmapData;
77 77
78 // Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains 78 // Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains
79 // either the bitmap data if the favicon database has a sufficiently large 79 // either the bitmap data if the favicon database has a sufficiently large
80 // favicon bitmap and the style of the fallback icon otherwise. 80 // favicon bitmap and the style of the fallback icon otherwise.
81 struct LargeIconResult { 81 struct LargeIconResult {
82 LargeIconResult(); 82 explicit LargeIconResult(const FaviconRawBitmapResult& bitmap_in);
83
84 // Takes ownership of |fallback_icon_style_in|.
85 explicit LargeIconResult(FallbackIconStyle* fallback_icon_style_in);
86
83 ~LargeIconResult(); 87 ~LargeIconResult();
84 88
85 // The bitmap from the favicon database if the database has a sufficiently 89 // The bitmap from the favicon database if the database has a sufficiently
86 // large one. 90 // large one.
87 FaviconRawBitmapResult bitmap; 91 FaviconRawBitmapResult bitmap;
88 92
89 // The fallback icon style if a sufficiently large icon isn't available. This 93 // The fallback icon style if a sufficiently large icon isn't available. This
90 // uses the dominant color of a smaller icon as the background if available. 94 // uses the dominant color of a smaller icon as the background if available.
91 scoped_ptr<FallbackIconStyle> fallback_icon_style; 95 scoped_ptr<FallbackIconStyle> fallback_icon_style;
92 }; 96 };
93 97
94 } // namespace favicon_base 98 } // namespace favicon_base
95 99
96 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ 100 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
OLDNEW
« no previous file with comments | « components/favicon/core/large_icon_service.cc ('k') | components/favicon_base/favicon_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698