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

Unified Diff: chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h

Issue 864963004: Implement an ObjC wrapper for fetching account chooser avatar images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h
diff --git a/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h b/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..92f3321dd004af6b57fa00c188f0f113bc5a540f
--- /dev/null
+++ b/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_
+#define CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_
+
+#include <Cocoa/Cocoa.h>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_vector.h"
+#include "net/url_request/url_request_context_getter.h"
+
+class AccountAvatarFetcherBridge;
+@class CredentialItemView;
+class GURL;
+
+// Handles retrieving avatar images for credential items.
+@interface AccountAvatarFetcherManager : NSObject {
+ ScopedVector<AccountAvatarFetcherBridge> bridges_;
+ scoped_refptr<net::URLRequestContextGetter> requestContext_;
+}
+
+// Initializes a manager with the specified request context.
+- (id)initWithRequestContext:
+ (scoped_refptr<net::URLRequestContextGetter>)requestContext;
+
+// Retrieves the image located at |avatarURL| and updates |view| if successful.
+- (void)fetchAvatar:(const GURL&)avatarURL forView:(CredentialItemView*)view;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_AVATAR_FETCHER_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698