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

Unified Diff: chrome/common/extensions/unpacker.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/common/extensions/unpacker.cc
===================================================================
--- chrome/common/extensions/unpacker.cc (revision 208527)
+++ chrome/common/extensions/unpacker.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/url_constants.h"
+#include "content/public/child/image_decoder_utils.h"
#include "content/public/common/common_param_traits.h"
#include "extensions/common/constants.h"
#include "grit/generated_resources.h"
@@ -31,7 +32,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/zlib/google/zip.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/image_decoder.h"
+#include "ui/gfx/size.h"
namespace errors = extension_manifest_errors;
namespace keys = extension_manifest_keys;
@@ -53,8 +54,9 @@
// Decode the image using WebKit's image decoder.
const unsigned char* data =
reinterpret_cast<const unsigned char*>(file_contents.data());
- webkit_glue::ImageDecoder decoder;
- SkBitmap bitmap = decoder.Decode(data, file_contents.length());
+ SkBitmap bitmap = content::DecodeImage(data,
+ gfx::Size(),
+ file_contents.length());
Sk64 bitmap_size = bitmap.getSize64();
if (!bitmap_size.is32() || bitmap_size.get32() > kMaxImageCanvas)
return SkBitmap();
« no previous file with comments | « chrome/common/extensions/manifest_handlers/icons_handler.cc ('k') | chrome/renderer/chrome_render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698