OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/image_decoder.h" | 5 #include "webkit/glue/image_decoder.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" | 7 #include "third_party/WebKit/public/platform/WebData.h" |
8 #include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h" | 8 #include "third_party/WebKit/public/platform/WebImage.h" |
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 9 #include "third_party/WebKit/public/platform/WebSize.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 | 11 |
12 using WebKit::WebData; | 12 using WebKit::WebData; |
13 using WebKit::WebImage; | 13 using WebKit::WebImage; |
14 | 14 |
15 namespace webkit_glue { | 15 namespace webkit_glue { |
16 | 16 |
17 ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) { | 17 ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) { |
18 } | 18 } |
19 | 19 |
(...skipping 15 matching lines...) Expand all Loading... |
35 const unsigned char* data, size_t size) { | 35 const unsigned char* data, size_t size) { |
36 const WebKit::WebVector<WebImage>& images = WebImage::framesFromData( | 36 const WebKit::WebVector<WebImage>& images = WebImage::framesFromData( |
37 WebData(reinterpret_cast<const char*>(data), size)); | 37 WebData(reinterpret_cast<const char*>(data), size)); |
38 std::vector<SkBitmap> result; | 38 std::vector<SkBitmap> result; |
39 for (size_t i = 0; i < images.size(); ++i) | 39 for (size_t i = 0; i < images.size(); ++i) |
40 result.push_back(images[i].getSkBitmap()); | 40 result.push_back(images[i].getSkBitmap()); |
41 return result; | 41 return result; |
42 } | 42 } |
43 | 43 |
44 } // namespace webkit_glue | 44 } // namespace webkit_glue |
OLD | NEW |