OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_RESIZED_AVATAR_CACHE_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_RESIZED_AVATAR_CACHE_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 @class ChromeIdentity; |
| 11 @class UIImage; |
| 12 |
| 13 // This class manages an image cache for resized avatar images. |
| 14 @interface ResizedAvatarCache : NSObject |
| 15 // Returns cached resized image, if it exists. If the identity avatar has not |
| 16 // yet been fetched, this method triggers a fetch and returns the default |
| 17 // avatar image. The user of this class should be an observer of identity |
| 18 // updates. When notified of identity updates, this method should be called |
| 19 // again to obtain an updated resized image. |
| 20 - (UIImage*)resizedAvatarForIdentity:(ChromeIdentity*)identity; |
| 21 @end |
| 22 |
| 23 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_RESIZED_AVATAR_CACHE_H_ |
OLD | NEW |