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_service.h" | 5 #include "chrome/browser/favicon/favicon_service.h" |
6 | 6 |
7 #include "base/hash.h" | 7 #include "base/hash.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "chrome/browser/favicon/favicon_util.h" | 9 #include "chrome/browser/favicon/favicon_util.h" |
10 #include "chrome/browser/history/history_backend.h" | 10 #include "chrome/browser/history/history_backend.h" |
11 #include "chrome/browser/history/history_service.h" | 11 #include "chrome/browser/history/history_service.h" |
12 #include "chrome/browser/history/history_service_factory.h" | 12 #include "chrome/browser/history/history_service_factory.h" |
13 #include "chrome/browser/history/select_favicon_frames.h" | |
14 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 13 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
15 #include "chrome/common/importer/imported_favicon_usage.h" | 14 #include "chrome/common/importer/imported_favicon_usage.h" |
16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
17 #include "components/favicon_base/favicon_types.h" | 16 #include "components/favicon_base/favicon_types.h" |
| 17 #include "components/favicon_base/select_favicon_frames.h" |
18 #include "extensions/common/constants.h" | 18 #include "extensions/common/constants.h" |
19 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
20 #include "ui/gfx/codec/png_codec.h" | 20 #include "ui/gfx/codec/png_codec.h" |
21 #include "ui/gfx/favicon_size.h" | 21 #include "ui/gfx/favicon_size.h" |
22 #include "ui/gfx/image/image_skia.h" | 22 #include "ui/gfx/image/image_skia.h" |
23 | 23 |
24 using base::Bind; | 24 using base::Bind; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false, | 401 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false, |
402 &resized_bitmap_data)) { | 402 &resized_bitmap_data)) { |
403 callback.Run(favicon_base::FaviconBitmapResult()); | 403 callback.Run(favicon_base::FaviconBitmapResult()); |
404 return; | 404 return; |
405 } | 405 } |
406 | 406 |
407 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( | 407 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( |
408 &resized_bitmap_data); | 408 &resized_bitmap_data); |
409 callback.Run(bitmap_result); | 409 callback.Run(bitmap_result); |
410 } | 410 } |
OLD | NEW |