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

Unified Diff: components/user_manager/user_image/user_image.h

Issue 1748423005: Crop the user-specified profile image for WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 9 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: components/user_manager/user_image/user_image.h
diff --git a/components/user_manager/user_image/user_image.h b/components/user_manager/user_image/user_image.h
index 63970964d1c15bb2b5607d4cacd74e88091d3b76..d6621be66e37eb7b8ae9e4a4100ea956ead2ac62 100644
--- a/components/user_manager/user_image/user_image.h
+++ b/components/user_manager/user_image/user_image.h
@@ -24,6 +24,10 @@ class USER_MANAGER_EXPORT UserImage {
// TODO(ivankr): replace with RefCountedMemory to prevent copying.
typedef std::vector<unsigned char> Bytes;
+ // Encodes the given bitmap to bytes representation for WebUI. Returns null
+ // on failure.
+ static scoped_ptr<Bytes> Encode(const SkBitmap& bitmap);
+
// Creates a new instance from a given still frame and tries to encode it
// to bytes representation for WebUI.
// TODO(ivankr): remove eventually.

Powered by Google App Engine
This is Rietveld 408576698