OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/gfx/png_decoder.h" | 7 #include "base/gfx/png_decoder.h" |
8 #include "base/gfx/png_encoder.h" | 8 #include "base/gfx/png_encoder.h" |
9 #include "chrome/browser/navigation_entry.h" | 9 #include "chrome/browser/navigation_entry.h" |
10 #include "chrome/browser/navigation_controller.h" | 10 #include "chrome/browser/navigation_controller.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 DCHECK(download_requests_.find(download_id) == download_requests_.end()); | 250 DCHECK(download_requests_.find(download_id) == download_requests_.end()); |
251 download_requests_[download_id] = | 251 download_requests_[download_id] = |
252 DownloadRequest(entry->url(), entry->favicon().url()); | 252 DownloadRequest(entry->url(), entry->favicon().url()); |
253 } | 253 } |
254 | 254 |
255 SkBitmap FavIconHelper::ConvertToFavIconSize(const SkBitmap& image) { | 255 SkBitmap FavIconHelper::ConvertToFavIconSize(const SkBitmap& image) { |
256 int width = image.width(); | 256 int width = image.width(); |
257 int height = image.height(); | 257 int height = image.height(); |
258 if (width > 0 && height > 0) { | 258 if (width > 0 && height > 0) { |
259 calc_favicon_target_size(&width, &height); | 259 calc_favicon_target_size(&width, &height); |
260 return gfx::ImageOperations::Resize( | 260 return skia::ImageOperations::Resize( |
261 image, gfx::ImageOperations::RESIZE_LANCZOS3, | 261 image, skia::ImageOperations::RESIZE_LANCZOS3, |
262 gfx::Size(width, height)); | 262 width, height); |
263 } | 263 } |
264 return image; | 264 return image; |
265 } | 265 } |
266 | 266 |
OLD | NEW |