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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 } // namespace | 305 } // namespace |
306 | 306 |
307 LargeIconService::LargeIconService( | 307 LargeIconService::LargeIconService( |
308 FaviconService* favicon_service, | 308 FaviconService* favicon_service, |
309 const scoped_refptr<base::TaskRunner>& background_task_runner, | 309 const scoped_refptr<base::TaskRunner>& background_task_runner, |
310 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher) | 310 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher) |
311 : favicon_service_(favicon_service), | 311 : favicon_service_(favicon_service), |
312 background_task_runner_(background_task_runner), | 312 background_task_runner_(background_task_runner), |
313 image_fetcher_(std::move(image_fetcher)) { | 313 image_fetcher_(std::move(image_fetcher)) { |
| 314 large_icon_types_.push_back(favicon_base::IconType::WEB_MANIFEST_ICON); |
314 large_icon_types_.push_back(favicon_base::IconType::FAVICON); | 315 large_icon_types_.push_back(favicon_base::IconType::FAVICON); |
315 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON); | 316 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON); |
316 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON); | 317 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON); |
317 } | 318 } |
318 | 319 |
319 LargeIconService::~LargeIconService() { | 320 LargeIconService::~LargeIconService() { |
320 } | 321 } |
321 | 322 |
322 base::CancelableTaskTracker::TaskId | 323 base::CancelableTaskTracker::TaskId |
323 LargeIconService::GetLargeIconOrFallbackStyle( | 324 LargeIconService::GetLargeIconOrFallbackStyle( |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // TODO(beaudoin): For now this is just a wrapper around | 418 // TODO(beaudoin): For now this is just a wrapper around |
418 // GetLargestRawFaviconForPageURL. Add the logic required to select the best | 419 // GetLargestRawFaviconForPageURL. Add the logic required to select the best |
419 // possible large icon. Also add logic to fetch-on-demand when the URL of | 420 // possible large icon. Also add logic to fetch-on-demand when the URL of |
420 // a large icon is known but its bitmap is not available. | 421 // a large icon is known but its bitmap is not available. |
421 return favicon_service_->GetLargestRawFaviconForPageURL( | 422 return favicon_service_->GetLargestRawFaviconForPageURL( |
422 page_url, large_icon_types_, min_source_size_in_pixel, | 423 page_url, large_icon_types_, min_source_size_in_pixel, |
423 base::Bind(&LargeIconWorker::OnIconLookupComplete, worker), tracker); | 424 base::Bind(&LargeIconWorker::OnIconLookupComplete, worker), tracker); |
424 } | 425 } |
425 | 426 |
426 } // namespace favicon | 427 } // namespace favicon |
OLD | NEW |