| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Because the unit tests for gfx::Image are spread across multiple | 5 // Because the unit tests for gfx::Image are spread across multiple |
| 6 // implementation files, this header contains the reusable components. | 6 // implementation files, this header contains the reusable components. |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/image_unittest_util.h" | 9 #include "ui/gfx/image_unittest_util.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 return image; | 36 return image; |
| 37 #elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 37 #elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
| 38 return gfx::GdkPixbufFromSkBitmap(bitmap.get()); | 38 return gfx::GdkPixbufFromSkBitmap(bitmap.get()); |
| 39 #else | 39 #else |
| 40 return bitmap.release(); | 40 return bitmap.release(); |
| 41 #endif | 41 #endif |
| 42 } | 42 } |
| 43 | 43 |
| 44 gfx::Image::RepresentationType GetPlatformRepresentationType() { | 44 gfx::Image::RepresentationType GetPlatformRepresentationType() { |
| 45 #if defined(OS_MACOSX) | 45 #if defined(OS_MACOSX) |
| 46 return gfx::Image::kNSImageRep; | 46 return gfx::Image::kImageRepCocoa; |
| 47 #elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 47 #elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
| 48 return gfx::Image::kGdkPixbufRep; | 48 return gfx::Image::kImageRepGdk; |
| 49 #else | 49 #else |
| 50 return gfx::Image::kSkBitmapRep; | 50 return gfx::Image::kImageRepSkia; |
| 51 #endif | 51 #endif |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace test | 54 } // namespace test |
| 55 } // namespace gfx | 55 } // namespace gfx |
| OLD | NEW |