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

Unified Diff: webkit/glue/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
« no previous file with comments | « webkit/glue/image_decoder.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/image_decoder.cc
===================================================================
--- webkit/glue/image_decoder.cc (revision 208527)
+++ webkit/glue/image_decoder.cc (working copy)
@@ -1,44 +0,0 @@
-// Copyright (c) 2012 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 "third_party/WebKit/public/platform/WebData.h"
-#include "third_party/WebKit/public/platform/WebImage.h"
-#include "third_party/WebKit/public/platform/WebSize.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-
-using WebKit::WebData;
-using WebKit::WebImage;
-
-namespace webkit_glue {
-
-ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) {
-}
-
-ImageDecoder::ImageDecoder(const gfx::Size& desired_icon_size)
- : desired_icon_size_(desired_icon_size) {
-}
-
-ImageDecoder::~ImageDecoder() {
-}
-
-SkBitmap ImageDecoder::Decode(const unsigned char* data, size_t size) const {
- const WebImage& image = WebImage::fromData(
- WebData(reinterpret_cast<const char*>(data), size), desired_icon_size_);
- return image.getSkBitmap();
-}
-
-// static
-std::vector<SkBitmap> ImageDecoder::DecodeAll(
- const unsigned char* data, size_t size) {
- const WebKit::WebVector<WebImage>& images = WebImage::framesFromData(
- WebData(reinterpret_cast<const char*>(data), size));
- std::vector<SkBitmap> result;
- for (size_t i = 0; i < images.size(); ++i)
- result.push_back(images[i].getSkBitmap());
- return result;
-}
-
-} // namespace webkit_glue
« no previous file with comments | « webkit/glue/image_decoder.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698