OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/core/large_icon_service.h" | 5 #include "components/favicon/core/large_icon_service.h" |
6 | 6 |
7 #include "components/favicon/core/favicon_service.h" | 7 #include "components/favicon/core/favicon_service.h" |
8 #include "components/favicon_base/fallback_icon_style.h" | 8 #include "components/favicon_base/fallback_icon_style.h" |
9 #include "components/favicon_base/favicon_types.h" | 9 #include "components/favicon_base/favicon_types.h" |
10 | 10 |
11 namespace favicon { | 11 namespace favicon { |
12 | 12 |
13 LargeIconService::LargeIconService(FaviconService* favicon_service) | 13 LargeIconService::LargeIconService(FaviconService* favicon_service) |
14 : favicon_service_(favicon_service) { | 14 : favicon_service_(favicon_service) { |
15 large_icon_types_.push_back(favicon_base::IconType::LARGE_ICON); | |
huangs
2015/05/04 05:17:30
NIT: Move this after TOUCH_PRECOMPOSED_ICON for co
Roger McFarlane (Chromium)
2015/05/04 18:48:15
Done.
| |
15 large_icon_types_.push_back(favicon_base::IconType::FAVICON); | 16 large_icon_types_.push_back(favicon_base::IconType::FAVICON); |
16 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON); | 17 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON); |
17 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON); | 18 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON); |
18 } | 19 } |
19 | 20 |
20 LargeIconService::~LargeIconService() { | 21 LargeIconService::~LargeIconService() { |
21 } | 22 } |
22 | 23 |
23 base::CancelableTaskTracker::TaskId | 24 base::CancelableTaskTracker::TaskId |
24 LargeIconService::GetLargeIconOrFallbackStyle( | 25 LargeIconService::GetLargeIconOrFallbackStyle( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 } | 68 } |
68 | 69 |
69 // The bitmap is square and at least as large as the requested one, return | 70 // The bitmap is square and at least as large as the requested one, return |
70 // it. | 71 // it. |
71 // TODO(beaudoin): Resize the icon if it's too large. Alternatively, return | 72 // TODO(beaudoin): Resize the icon if it's too large. Alternatively, return |
72 // it and let the HTML resize it. | 73 // it and let the HTML resize it. |
73 callback.Run(favicon_base::LargeIconResult(bitmap_result)); | 74 callback.Run(favicon_base::LargeIconResult(bitmap_result)); |
74 } | 75 } |
75 | 76 |
76 } // namespace favicon | 77 } // namespace favicon |
OLD | NEW |