OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
11 #include "components/autofill/core/common/password_form.h" | 11 #include "components/autofill/core/common/password_form.h" |
12 #include "components/password_manager/content/common/credential_manager_types.h" | 12 #include "components/password_manager/core/common/credential_manager_types.h" |
13 | 13 |
14 @class CredentialItemView; | 14 @class CredentialItemView; |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 // Handles user interaction with and image fetching for a CredentialItemView. | 17 // Handles user interaction with and image fetching for a CredentialItemView. |
18 @protocol CredentialItemDelegate<NSObject> | 18 @protocol CredentialItemDelegate<NSObject> |
19 | 19 |
20 // Retrieves the image located at |avatarURL| and updates |view| by calling | 20 // Retrieves the image located at |avatarURL| and updates |view| by calling |
21 // [CredentialItemView updateAvatar:] if successful. | 21 // [CredentialItemView updateAvatar:] if successful. |
22 - (void)fetchAvatar:(const GURL&)avatarURL forView:(CredentialItemView*)view; | 22 - (void)fetchAvatar:(const GURL&)avatarURL forView:(CredentialItemView*)view; |
(...skipping 22 matching lines...) Expand all Loading... |
45 // Sets a custom avatar for this item. The image should be scaled and cropped | 45 // Sets a custom avatar for this item. The image should be scaled and cropped |
46 // to a circle of size |kAvatarImageSize|, otherwise it will look ridiculous. | 46 // to a circle of size |kAvatarImageSize|, otherwise it will look ridiculous. |
47 - (void)updateAvatar:(NSImage*)avatar; | 47 - (void)updateAvatar:(NSImage*)avatar; |
48 | 48 |
49 // The default avatar image, used when a custom one is not set. | 49 // The default avatar image, used when a custom one is not set. |
50 + (NSImage*)defaultAvatar; | 50 + (NSImage*)defaultAvatar; |
51 | 51 |
52 @end | 52 @end |
53 | 53 |
54 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ | 54 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_CREDENTIAL_ITEM_VIEW_H_ |
OLD | NEW |