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 "chrome/browser/favicon/favicon_handler.h" | 5 #include "chrome/browser/favicon/favicon_handler.h" |
6 | 6 |
7 #include "build/build_config.h" | |
8 | |
9 #include <algorithm> | 7 #include <algorithm> |
10 #include <cmath> | 8 #include <cmath> |
11 #include <vector> | 9 #include <vector> |
12 | 10 |
13 #include "base/bind.h" | 11 #include "base/bind.h" |
14 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
15 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 14 #include "build/build_config.h" |
16 #include "chrome/browser/favicon/favicon_service.h" | 15 #include "chrome/browser/favicon/favicon_service.h" |
17 #include "chrome/browser/favicon/favicon_service_factory.h" | 16 #include "components/favicon/core/browser/favicon_client.h" |
| 17 #include "components/favicon/core/favicon_driver.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.h" | |
23 #include "ui/gfx/image/image_skia.h" | 22 #include "ui/gfx/image/image_skia.h" |
24 #include "ui/gfx/image/image_util.h" | 23 #include "ui/gfx/image/image_util.h" |
25 | 24 |
26 using favicon::FaviconURL; | 25 using favicon::FaviconURL; |
27 | 26 |
28 namespace { | 27 namespace { |
29 | 28 |
30 // Size (along each axis) of a touch icon. This currently corresponds to | 29 // Size (along each axis) of a touch icon. This currently corresponds to |
31 // the apple touch icon for iPad. | 30 // the apple touch icon for iPad. |
32 const int kTouchIconSize = 144; | 31 const int kTouchIconSize = 144; |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 } else { | 679 } else { |
681 gfx::Size largest = i->icon_sizes[index]; | 680 gfx::Size largest = i->icon_sizes[index]; |
682 i->icon_sizes.clear(); | 681 i->icon_sizes.clear(); |
683 i->icon_sizes.push_back(largest); | 682 i->icon_sizes.push_back(largest); |
684 ++i; | 683 ++i; |
685 } | 684 } |
686 } | 685 } |
687 std::stable_sort(image_urls_.begin(), image_urls_.end(), | 686 std::stable_sort(image_urls_.begin(), image_urls_.end(), |
688 CompareIconSize); | 687 CompareIconSize); |
689 } | 688 } |
OLD | NEW |