Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2930)

Unified Diff: chrome/browser/bookmarks/enhanced/image_store_ios.h

Issue 259863007: Local salient image storage for enhanced bookmark experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
+#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 {
+// Encode the UIImage representation of a gfx::Image.
+const scoped_refptr<base::RefCountedMemory> bytesForImage(gfx::Image image);
+
+// 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_

Powered by Google App Engine
This is Rietveld 408576698