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

Unified Diff: ios/chrome/browser/ui/uikit_ui_util.h

Issue 2602903002: Factor iOS native image loading into a utility function. (Closed)
Patch Set: Fixed BUILD files. Created 4 years 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: ios/chrome/browser/ui/uikit_ui_util.h
diff --git a/ios/chrome/browser/ui/uikit_ui_util.h b/ios/chrome/browser/ui/uikit_ui_util.h
index 20ffbbbeb37a8fca52bc18d2e11db13126eb6adc..9179f3e5475174a8e43760ae762e8f59b85607fe 100644
--- a/ios/chrome/browser/ui/uikit_ui_util.h
+++ b/ios/chrome/browser/ui/uikit_ui_util.h
@@ -104,6 +104,15 @@ inline UIColor* UIColorFromRGB(int rgb, CGFloat alpha = 1.0) {
// Intended for use in debug.
BOOL ImageHasAlphaChannel(UIImage* image);
+// Returns the image from the shared resource bundle with the image id
+// |imageID|. If |reversable| is YES and RTL layout is in use, the image
+// will be flipped for RTL.
+UIImage* NativeReversableImage(int imageID, BOOL reversable);
+
+// Convenience version of NativeReversableImage for images that are never
+// reversable; equivalent to NativeReversableImage(imageID, NO).
+UIImage* NativeImage(int imageID);
+
// Returns an image resized to |targetSize|. It first calculate the projection
// by calling CalculateProjection() and then create a new image of the desired
// size and project the correct subset of the original image onto it.

Powered by Google App Engine
This is Rietveld 408576698