| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/favicon_handler.h" | 5 #include "components/favicon/core/favicon_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "components/favicon/core/browser/favicon_client.h" | 15 #include "components/favicon/core/favicon_client.h" |
| 16 #include "components/favicon/core/browser/favicon_service.h" | |
| 17 #include "components/favicon/core/favicon_driver.h" | 16 #include "components/favicon/core/favicon_driver.h" |
| 17 #include "components/favicon/core/favicon_service.h" |
| 18 #include "components/favicon_base/favicon_util.h" | 18 #include "components/favicon_base/favicon_util.h" |
| 19 #include "components/favicon_base/select_favicon_frames.h" | 19 #include "components/favicon_base/select_favicon_frames.h" |
| 20 #include "skia/ext/image_operations.h" | 20 #include "skia/ext/image_operations.h" |
| 21 #include "ui/gfx/codec/png_codec.h" | 21 #include "ui/gfx/codec/png_codec.h" |
| 22 #include "ui/gfx/image/image_skia.h" | 22 #include "ui/gfx/image/image_skia.h" |
| 23 #include "ui/gfx/image/image_util.h" | 23 #include "ui/gfx/image/image_util.h" |
| 24 | 24 |
| 25 using favicon::FaviconURL; | 25 using favicon::FaviconURL; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 continue; | 696 continue; |
| 697 | 697 |
| 698 gfx::Size largest = | 698 gfx::Size largest = |
| 699 image_url.icon_sizes[GetLargestSizeIndex(image_url.icon_sizes)]; | 699 image_url.icon_sizes[GetLargestSizeIndex(image_url.icon_sizes)]; |
| 700 image_url.icon_sizes.clear(); | 700 image_url.icon_sizes.clear(); |
| 701 image_url.icon_sizes.push_back(largest); | 701 image_url.icon_sizes.push_back(largest); |
| 702 } | 702 } |
| 703 std::stable_sort(image_urls_.begin(), image_urls_.end(), | 703 std::stable_sort(image_urls_.begin(), image_urls_.end(), |
| 704 CompareIconSize); | 704 CompareIconSize); |
| 705 } | 705 } |
| OLD | NEW |