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_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ |
7 | 7 |
8 #include <Cocoa/Cocoa.h> | 8 #include <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_vector.h" | |
12 #include "net/url_request/url_request_context_getter.h" | 11 #include "net/url_request/url_request_context_getter.h" |
13 | 12 |
14 class AccountAvatarFetcherBridge; | 13 class AccountAvatarFetcherBridge; |
15 @class CredentialItemButton; | 14 @class CredentialItemButton; |
16 class GURL; | 15 class GURL; |
17 | 16 |
18 // Handles retrieving avatar images for credential items. | 17 // Handles retrieving avatar images for credential items. |
19 @interface AccountAvatarFetcherManager : NSObject { | 18 @interface AccountAvatarFetcherManager : NSObject { |
20 ScopedVector<AccountAvatarFetcherBridge> bridges_; | 19 std::vector<std::unique_ptr<AccountAvatarFetcherBridge>> bridges_; |
21 scoped_refptr<net::URLRequestContextGetter> requestContext_; | 20 scoped_refptr<net::URLRequestContextGetter> requestContext_; |
22 } | 21 } |
23 | 22 |
24 // Initializes a manager with the specified request context. | 23 // Initializes a manager with the specified request context. |
25 - (id)initWithRequestContext: | 24 - (id)initWithRequestContext: |
26 (scoped_refptr<net::URLRequestContextGetter>)requestContext; | 25 (scoped_refptr<net::URLRequestContextGetter>)requestContext; |
27 | 26 |
28 // Retrieves the image located at |avatarURL| and updates |view| if successful. | 27 // Retrieves the image located at |avatarURL| and updates |view| if successful. |
29 - (void)fetchAvatar:(const GURL&)avatarURL forView:(CredentialItemButton*)view; | 28 - (void)fetchAvatar:(const GURL&)avatarURL forView:(CredentialItemButton*)view; |
30 | 29 |
31 @end | 30 @end |
32 | 31 |
33 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ | 32 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_ |
OLD | NEW |