| 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_util.h" | 5 #include "chrome/browser/favicon/favicon_util.h" |
| 6 | 6 |
| 7 #include "chrome/browser/favicon/select_favicon_frames.h" | |
| 8 #include "chrome/browser/history/history_types.h" | 7 #include "chrome/browser/history/history_types.h" |
| 8 #include "chrome/browser/history/select_favicon_frames.h" |
| 9 #include "chrome/common/icon_messages.h" | 9 #include "chrome/common/icon_messages.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| 11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 #include "ui/gfx/codec/png_codec.h" | 12 #include "ui/gfx/codec/png_codec.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 | 14 |
| 15 // static | 15 // static |
| 16 int FaviconUtil::DownloadFavicon(content::RenderViewHost* rvh, | 16 int FaviconUtil::DownloadFavicon(content::RenderViewHost* rvh, |
| 17 const GURL& url, | 17 const GURL& url, |
| 18 int image_size) { | 18 int image_size) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 if (bitmaps.empty()) | 42 if (bitmaps.empty()) |
| 43 return gfx::Image(); | 43 return gfx::Image(); |
| 44 | 44 |
| 45 gfx::ImageSkia resized_image_skia = SelectFaviconFrames(bitmaps, | 45 gfx::ImageSkia resized_image_skia = SelectFaviconFrames(bitmaps, |
| 46 ui::GetSupportedScaleFactors(), favicon_size, NULL); | 46 ui::GetSupportedScaleFactors(), favicon_size, NULL); |
| 47 return gfx::Image(resized_image_skia); | 47 return gfx::Image(resized_image_skia); |
| 48 } | 48 } |
| OLD | NEW |