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

Unified Diff: content/public/child/image_decoder_utils.h

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/public/child/image_decoder_utils.h
===================================================================
--- content/public/child/image_decoder_utils.h (revision 0)
+++ content/public/child/image_decoder_utils.h (revision 0)
@@ -0,0 +1,24 @@
+// 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.
+
+#ifndef CONTENT_PUBLIC_UTILITY_IMAGE_DECODER_UTILS_H_
+#define CONTENT_PUBLIC_UTILITY_IMAGE_DECODER_UTILS_H_
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+#include "ui/gfx/size.h"
+
+class SkBitmap;
+
+namespace content {
+
+// Helper function to decode the image using the data passed in.
+// On success returns the decoded image.
+// On failure returns an empty bitmap.
+CONTENT_EXPORT SkBitmap DecodeImage(const unsigned char* data,
+ const gfx::Size& desired_image_size,
+ size_t size);
+} // namespace content
+
+#endif // CONTENT_PUBLIC_UTILITY_IMAGE_DECODER_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698