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

Side by Side Diff: ios/public/provider/chrome/browser/native_app_launcher/native_app_metadata.h

Issue 2669173002: Use IOSImageDataFetcherWrapper (Closed)
Patch Set: Update comments Created 3 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 unified diff | Download patch
« no previous file with comments | « ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_metadata.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_METADA TA_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_METADA TA_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_METADA TA_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_METADA TA_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types .h" 10 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types .h"
11 11
12 @class ChromeIdentity; 12 @class ChromeIdentity;
13 class GURL; 13 class GURL;
14 @class UIImage; 14 @class UIImage;
15 15
16 namespace image_fetcher {
17 class IOSImageDataFetcherWrapper;
18 }
19
16 namespace net { 20 namespace net {
17 class URLRequestContextGetter; 21 class URLRequestContextGetter;
18 } 22 }
19 23
20 // Protocol todo describe 24 // Protocol todo describe
21 @protocol NativeAppMetadata<NSObject> 25 @protocol NativeAppMetadata<NSObject>
22 26
23 // Defines whether the app should be opened automatically upon Link Navigation. 27 // Defines whether the app should be opened automatically upon Link Navigation.
24 // This is a tri-state value internally: Yes, No, not set. However, externally, 28 // This is a tri-state value internally: Yes, No, not set. However, externally,
25 // only the Yes/No state is returned via the property getter. If the internal 29 // only the Yes/No state is returned via the property getter. If the internal
(...skipping 26 matching lines...) Expand all
52 56
53 // Returns whether this native app is installed. 57 // Returns whether this native app is installed.
54 - (BOOL)isInstalled; 58 - (BOOL)isInstalled;
55 59
56 // Returns the URL string that launches Apple AppStore for this app. 60 // Returns the URL string that launches Apple AppStore for this app.
57 - (NSString*)appStoreURL; 61 - (NSString*)appStoreURL;
58 62
59 // Returns the URL to test if the app is installed. 63 // Returns the URL to test if the app is installed.
60 - (NSURL*)appURLforURL:(NSURL*)url; 64 - (NSURL*)appURLforURL:(NSURL*)url;
61 65
66 // Deprecated. Use fetchSmallIconWithImageFetcher:completionBlock: instead.
62 // Calls |block| with the application icon. |contextGetter| must not be nil. 67 // Calls |block| with the application icon. |contextGetter| must not be nil.
63 - (void)fetchSmallIconWithContext:(net::URLRequestContextGetter*)contextGetter 68 - (void)fetchSmallIconWithContext:(net::URLRequestContextGetter*)contextGetter
gambard 2017/02/02 10:34:07 Kept for downstream compatibility.
gambard 2017/02/02 10:46:02 Wrong CL order. This is not needed. Removed.
64 completionBlock:(void (^)(UIImage*))block; 69 completionBlock:(void (^)(UIImage*))block;
65 70
71 // Calls |block| with the application icon. |imageFetcher| must be kept alive
72 // during the fetch.
73 - (void)fetchSmallIconWithImageFetcher:
74 (image_fetcher::IOSImageDataFetcherWrapper*)imageFetcher
75 completionBlock:(void (^)(UIImage*))block;
76
66 // Returns whether this native application can open the |url|. 77 // Returns whether this native application can open the |url|.
67 - (BOOL)canOpenURL:(const GURL&)url; 78 - (BOOL)canOpenURL:(const GURL&)url;
68 79
69 // Returns the launch URL with which the application can be opened. |gurl| is 80 // Returns the launch URL with which the application can be opened. |gurl| is
70 // the URL of the content in the web app. If |identity| is not nil, the 81 // the URL of the content in the web app. If |identity| is not nil, the
71 // returned URL contains a hash associated with |identity|. 82 // returned URL contains a hash associated with |identity|.
72 - (GURL)launchURLWithURL:(const GURL&)gurl identity:(ChromeIdentity*)identity; 83 - (GURL)launchURLWithURL:(const GURL&)gurl identity:(ChromeIdentity*)identity;
73 84
74 // Resets values of shouldBypassInfobars and numberOfDismissedInfoBarsKey. 85 // Resets values of shouldBypassInfobars and numberOfDismissedInfoBarsKey.
75 - (void)resetInfobarHistory; 86 - (void)resetInfobarHistory;
(...skipping 14 matching lines...) Expand all
90 - (void)willBeShownInInfobarOfType:(NativeAppControllerType)type; 101 - (void)willBeShownInInfobarOfType:(NativeAppControllerType)type;
91 102
92 // Informs the metadata on what user action on the infobar has been taken. 103 // Informs the metadata on what user action on the infobar has been taken.
93 // Requires to have previously send the message -[NativeAppMetadata 104 // Requires to have previously send the message -[NativeAppMetadata
94 // willBeShownInInfobarOfType:]. 105 // willBeShownInInfobarOfType:].
95 - (void)updateWithUserAction:(NativeAppActionType)userAction; 106 - (void)updateWithUserAction:(NativeAppActionType)userAction;
96 107
97 @end 108 @end
98 109
99 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_MET ADATA_H_ 110 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_MET ADATA_H_
OLDNEW
« no previous file with comments | « ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_metadata.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698