OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/fav_icon_helper.h" | 5 #include "chrome/browser/fav_icon_helper.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/ref_counted_memory.h" | 12 #include "base/ref_counted_memory.h" |
13 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/renderer_host/render_view_host.h" | 14 #include "chrome/browser/renderer_host/render_view_host.h" |
15 #include "chrome/browser/tab_contents/navigation_controller.h" | 15 #include "chrome/browser/tab_contents/navigation_controller.h" |
16 #include "chrome/browser/tab_contents/navigation_entry.h" | 16 #include "chrome/browser/tab_contents/navigation_entry.h" |
17 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 17 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
18 #include "chrome/browser/tab_contents/tab_contents.h" | 18 #include "chrome/browser/tab_contents/tab_contents.h" |
19 #include "gfx/codec/png_codec.h" | 19 #include "gfx/codec/png_codec.h" |
20 #include "gfx/favicon_size.h" | 20 #include "gfx/favicon_size.h" |
21 #include "skia/ext/image_operations.h" | 21 #include "skia/ext/image_operations.h" |
22 | 22 |
23 FavIconHelper::FavIconHelper(TabContents* tab_contents) | 23 FavIconHelper::FavIconHelper(TabContents* tab_contents) |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 int width = image.width(); | 289 int width = image.width(); |
290 int height = image.height(); | 290 int height = image.height(); |
291 if (width > 0 && height > 0) { | 291 if (width > 0 && height > 0) { |
292 calc_favicon_target_size(&width, &height); | 292 calc_favicon_target_size(&width, &height); |
293 return skia::ImageOperations::Resize( | 293 return skia::ImageOperations::Resize( |
294 image, skia::ImageOperations::RESIZE_LANCZOS3, | 294 image, skia::ImageOperations::RESIZE_LANCZOS3, |
295 width, height); | 295 width, height); |
296 } | 296 } |
297 return image; | 297 return image; |
298 } | 298 } |
OLD | NEW |