Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5258)

Unified Diff: chrome/browser/favicon/favicon_util.cc

Issue 17704002: Move image_decoder.cc/.h from webkit\glue to content\child. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/favicon/favicon_util.cc
===================================================================
--- chrome/browser/favicon/favicon_util.cc (revision 208527)
+++ chrome/browser/favicon/favicon_util.cc (working copy)
@@ -7,6 +7,7 @@
#include "chrome/browser/favicon/favicon_types.h"
#include "chrome/browser/history/select_favicon_frames.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/child/image_decoder_utils.h"
#include "googleurl/src/gurl.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -14,7 +15,7 @@
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/image_png_rep.h"
#include "ui/gfx/image/image_skia.h"
-#include "webkit/glue/image_decoder.h"
+#include "ui/gfx/size.h"
#if defined(OS_MACOSX) && !defined(OS_IOS)
#include "base/mac/mac_util.h"
@@ -205,9 +206,10 @@
size_t src_len,
std::vector<unsigned char>* png_data) {
// Decode the favicon using WebKit's image decoder.
- webkit_glue::ImageDecoder decoder(
- gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize));
- SkBitmap decoded = decoder.Decode(src_data, src_len);
+ SkBitmap decoded = content::DecodeImage(
+ src_data,
+ gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize),
+ src_len);
if (decoded.empty())
return false; // Unable to decode.

Powered by Google App Engine
This is Rietveld 408576698