OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 #ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |
| 5 #define CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |
| 6 |
| 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/ref_counted_memory.h" |
| 9 #include "ui/gfx/geometry/size.h" |
| 10 #include "ui/gfx/image/image.h" |
| 11 |
| 12 namespace image_store_ios { |
| 13 // Encode the UIImage representation of a gfx::Image. |
| 14 const scoped_refptr<base::RefCountedMemory> bytesForImage(gfx::Image image); |
| 15 |
| 16 // Decode the UIImage in the bytes and returns a gfx::Image. |
| 17 gfx::Image imageForBytes(const scoped_refptr<base::RefCountedMemory>& data); |
| 18 |
| 19 // Generates a gfx::Image with a random UIImage representation. Used for tests. |
| 20 gfx::Image generateRandomUIImage(gfx::Size& size, float scale); |
| 21 } |
| 22 |
| 23 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |
OLD | NEW |