| 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_types.h" | |
| 10 #include "chrome/browser/favicon/favicon_util.h" | 9 #include "chrome/browser/favicon/favicon_util.h" |
| 11 #include "chrome/browser/history/history_backend.h" | 10 #include "chrome/browser/history/history_backend.h" |
| 12 #include "chrome/browser/history/history_service.h" | 11 #include "chrome/browser/history/history_service.h" |
| 13 #include "chrome/browser/history/history_service_factory.h" | 12 #include "chrome/browser/history/history_service_factory.h" |
| 14 #include "chrome/browser/history/select_favicon_frames.h" | 13 #include "chrome/browser/history/select_favicon_frames.h" |
| 15 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 14 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 15 #include "chrome/common/favicon/favicon_types.h" |
| 16 #include "chrome/common/importer/imported_favicon_usage.h" | 16 #include "chrome/common/importer/imported_favicon_usage.h" |
| 17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.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 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false, | 364 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false, |
| 365 &resized_bitmap_data)) { | 365 &resized_bitmap_data)) { |
| 366 callback.Run(chrome::FaviconBitmapResult()); | 366 callback.Run(chrome::FaviconBitmapResult()); |
| 367 return; | 367 return; |
| 368 } | 368 } |
| 369 | 369 |
| 370 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( | 370 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( |
| 371 &resized_bitmap_data); | 371 &resized_bitmap_data); |
| 372 callback.Run(bitmap_result); | 372 callback.Run(bitmap_result); |
| 373 } | 373 } |
| 374 | |
| OLD | NEW |