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

Unified Diff: content/child/image_decoder.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: content/child/image_decoder.cc
===================================================================
--- content/child/image_decoder.cc (revision 208237)
+++ content/child/image_decoder.cc (working copy)
@@ -1,9 +1,10 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/image_decoder.h"
+#include "content/child/image_decoder.h"
+#include "content/public/child/image_decoder_utils.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebImage.h"
#include "third_party/WebKit/public/platform/WebSize.h"
@@ -12,8 +13,15 @@
using WebKit::WebData;
using WebKit::WebImage;
-namespace webkit_glue {
+namespace content {
+SkBitmap DecodeImage(const unsigned char* data,
+ const gfx::Size& desired_image_size,
+ size_t size) {
+ ImageDecoder decoder(desired_image_size);
+ return decoder.Decode(data, size);
+}
+
ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) {
}
@@ -41,4 +49,4 @@
return result;
}
-} // namespace webkit_glue
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698