OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "webkit/api/public/WebData.h" | 7 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" |
8 #include "webkit/api/public/WebImage.h" | 8 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" |
9 #include "webkit/api/public/WebSize.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 | 11 |
12 #if WEBKIT_USING_CG | 12 #if WEBKIT_USING_CG |
13 #include "skia/ext/skia_utils_mac.h" | 13 #include "skia/ext/skia_utils_mac.h" |
14 #endif | 14 #endif |
15 | 15 |
16 using WebKit::WebData; | 16 using WebKit::WebData; |
17 using WebKit::WebImage; | 17 using WebKit::WebImage; |
18 | 18 |
19 namespace webkit_glue { | 19 namespace webkit_glue { |
(...skipping 12 matching lines...) Expand all Loading... |
32 const WebImage& image = WebImage::fromData( | 32 const WebImage& image = WebImage::fromData( |
33 WebData(reinterpret_cast<const char*>(data), size), desired_icon_size_); | 33 WebData(reinterpret_cast<const char*>(data), size), desired_icon_size_); |
34 #if WEBKIT_USING_SKIA | 34 #if WEBKIT_USING_SKIA |
35 return image.getSkBitmap(); | 35 return image.getSkBitmap(); |
36 #elif WEBKIT_USING_CG | 36 #elif WEBKIT_USING_CG |
37 return gfx::CGImageToSkBitmap(image.getCGImageRef()); | 37 return gfx::CGImageToSkBitmap(image.getCGImageRef()); |
38 #endif | 38 #endif |
39 } | 39 } |
40 | 40 |
41 } // namespace webkit_glue | 41 } // namespace webkit_glue |
OLD | NEW |