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

Side by Side Diff: ios/chrome/browser/ui/history/favicon_view_provider.h

Issue 2590473002: Upstream Chrome on iOS source code [5/11]. (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
(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_HISTORY_FAVICON_VIEW_PROVIDER_H_
6 #define IOS_CHROME_BROWSER_UI_HISTORY_FAVICON_VIEW_PROVIDER_H_
7
8 #import <UIKit/UIKit.h>
9
10 namespace favicon {
11 class LargeIconService;
12 } // namespace favicon
13
14 @class FaviconView;
15 @class FaviconViewProvider;
16 class GURL;
17
18 // Delegate protocol for FaviconViewProvider.
19 @protocol FaviconViewProviderDelegate<NSObject>
20 // Called when favicon or fallback format has been fetched.
21 - (void)faviconViewProviderFaviconDidLoad:(FaviconViewProvider*)provider;
22 @end
23
24 // Object to fetch and configure the view for a favicon, or a fallback icon if
25 // there is no favicon image available with large enough resolution.
26 @interface FaviconViewProvider : NSObject
27 // A favicon or fallback format associated with |URL| will be fetched using
28 // |largeIconService|. The favicon will be rendered with height and width equal
29 // to |faviconSize|, and the image will be fetched if the source size is greater
30 // than or equal to |minFaviconSize|. The |delegate| is notified when the
31 // favicon has been loaded, and may be nil.
32 - (instancetype)initWithURL:(const GURL&)URL
33 faviconSize:(CGFloat)faviconSize
34 minFaviconSize:(CGFloat)minFaviconSize
35 largeIconService:(favicon::LargeIconService*)largeIconService
36 delegate:(id<FaviconViewProviderDelegate>)delegate
37 NS_DESIGNATED_INITIALIZER;
38 - (instancetype)init NS_UNAVAILABLE;
39
40 // View that displays a favicon or fallback icon.
41 @property(nonatomic, readonly) FaviconView* faviconView;
42
43 @end
44
45 #endif // IOS_CHROME_BROWSER_UI_HISTORY_FAVICON_VIEW_PROVIDER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/history/favicon_view.mm ('k') | ios/chrome/browser/ui/history/favicon_view_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698