OLD | NEW |
---|---|
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 #include "components/favicon_base/favicon_types.h" | 5 #include "components/favicon_base/favicon_types.h" |
6 | 6 |
7 #include "components/favicon_base/fallback_icon_style.h" | 7 #include "components/favicon_base/fallback_icon_style.h" |
8 | 8 |
9 namespace favicon_base { | 9 namespace favicon_base { |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... | |
31 // LargeIconResult | 31 // LargeIconResult |
32 | 32 |
33 LargeIconResult::LargeIconResult(const FaviconRawBitmapResult& bitmap_in) | 33 LargeIconResult::LargeIconResult(const FaviconRawBitmapResult& bitmap_in) |
34 : bitmap(bitmap_in) {} | 34 : bitmap(bitmap_in) {} |
35 | 35 |
36 LargeIconResult::LargeIconResult(FallbackIconStyle* fallback_icon_style_in) | 36 LargeIconResult::LargeIconResult(FallbackIconStyle* fallback_icon_style_in) |
37 : fallback_icon_style(fallback_icon_style_in) {} | 37 : fallback_icon_style(fallback_icon_style_in) {} |
38 | 38 |
39 LargeIconResult::~LargeIconResult() {} | 39 LargeIconResult::~LargeIconResult() {} |
40 | 40 |
41 bool LargeIconResult::is_empty() const { | |
pkotwicz
2017/05/12 07:40:38
I think that the implementation should be in the c
jkrcal
2017/05/12 11:49:02
The reason I put it here because something similar
| |
42 if (bitmap.is_valid()) | |
43 return false; | |
44 if (fallback_icon_style && !fallback_icon_style->is_default_background_color) | |
45 return false; | |
46 return true; | |
47 } | |
48 | |
41 // -------------------------------------------------------- | 49 // -------------------------------------------------------- |
42 // LargeIconImageResult | 50 // LargeIconImageResult |
43 | 51 |
44 LargeIconImageResult::LargeIconImageResult(const gfx::Image& image_in) | 52 LargeIconImageResult::LargeIconImageResult(const gfx::Image& image_in) |
45 : image(image_in) {} | 53 : image(image_in) {} |
46 | 54 |
47 LargeIconImageResult::LargeIconImageResult( | 55 LargeIconImageResult::LargeIconImageResult( |
48 FallbackIconStyle* fallback_icon_style_in) | 56 FallbackIconStyle* fallback_icon_style_in) |
49 : fallback_icon_style(fallback_icon_style_in) {} | 57 : fallback_icon_style(fallback_icon_style_in) {} |
50 | 58 |
51 LargeIconImageResult::~LargeIconImageResult() {} | 59 LargeIconImageResult::~LargeIconImageResult() {} |
52 | 60 |
53 } // namespace favicon_base | 61 } // namespace favicon_base |
OLD | NEW |