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

Unified Diff: chrome/common/extensions/manifest_handlers/icons_handler.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
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/extensions/unpacker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/manifest_handlers/icons_handler.cc
===================================================================
--- chrome/common/extensions/manifest_handlers/icons_handler.cc (revision 208527)
+++ chrome/common/extensions/manifest_handlers/icons_handler.cc (working copy)
@@ -14,11 +14,12 @@
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest_handler_helpers.h"
+#include "content/public/child/image_decoder_utils.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
-#include "webkit/glue/image_decoder.h"
+#include "ui/gfx/size.h"
namespace keys = extension_manifest_keys;
@@ -71,9 +72,8 @@
// Decode the image using WebKit's image decoder.
const unsigned char* data =
reinterpret_cast<const unsigned char*>(file_contents.data());
- webkit_glue::ImageDecoder decoder;
scoped_ptr<SkBitmap> decoded(new SkBitmap());
- *decoded = decoder.Decode(data, file_contents.length());
+ *decoded = content::DecodeImage(data, gfx::Size(), file_contents.length());
if (decoded->empty()) {
DLOG(ERROR) << "Could not decode icon file: "
<< icon_path.LossyDisplayName();
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/extensions/unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698