Chromium Code Reviews| Index: chrome/browser/bookmarks/enhanced/image_store_ios.h |
| diff --git a/chrome/browser/bookmarks/enhanced/image_store_ios.h b/chrome/browser/bookmarks/enhanced/image_store_ios.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..89f2e20de20e684ad90a480d36ebf3c3ab6191fd |
| --- /dev/null |
| +++ b/chrome/browser/bookmarks/enhanced/image_store_ios.h |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2014 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. |
| +#ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |
|
sky
2014/04/30 18:09:13
nit: newline 3/4.
Kibeom Kim (inactive)
2014/05/01 19:02:26
Done.
|
| +#define CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/ref_counted_memory.h" |
| +#include "ui/gfx/geometry/size.h" |
| +#include "ui/gfx/image/image.h" |
| + |
| +namespace image_store_ios { |
|
sky
2014/04/30 18:09:13
Don't use a namespace in chrome. But once you move
sky
2014/04/30 18:09:13
Why is this only ios? It would be a lot cleaner if
Kibeom Kim (inactive)
2014/05/01 19:02:26
Done.
Kibeom Kim (inactive)
2014/05/01 19:02:26
Done.
|
| +// Encode the UIImage representation of a gfx::Image. |
| +const scoped_refptr<base::RefCountedMemory> bytesForImage(gfx::Image image); |
|
sky
2014/04/30 18:09:13
Using C++ naming, eg BytesForImage.
Kibeom Kim (inactive)
2014/05/01 19:02:26
Done.
|
| + |
| +// Decode the UIImage in the bytes and returns a gfx::Image. |
| +gfx::Image imageForBytes(const scoped_refptr<base::RefCountedMemory>& data); |
| + |
| +// Generates a gfx::Image with a random UIImage representation. Used for tests. |
| +gfx::Image generateRandomUIImage(gfx::Size& size, float scale); |
| +} |
| + |
| +#endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_IMAGE_STORE_IOS_H_ |