Chromium Code Reviews| Index: ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h |
| diff --git a/ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h b/ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ffe3b35ad777920d6ddb596cc6f95bf5363a851 |
| --- /dev/null |
| +++ b/ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 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 IOS_INTERNAL_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_WHITELIST_MANAGER_H_ |
|
rohitrao (ping after 24h)
2016/11/08 12:39:18
Update header guards.
sczs1
2016/11/09 01:14:52
Done.
|
| +#define IOS_INTERNAL_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_WHITELIST_MANAGER_H_ |
| + |
| +#import <Foundation/Foundation.h> |
|
rohitrao (ping after 24h)
2016/11/08 12:39:18
Blank line after this import.
sczs1
2016/11/09 01:14:52
Done.
|
| +class GURL; |
| +@protocol NativeAppMetadata; |
| +typedef BOOL (^NativeAppFilter)(const id<NativeAppMetadata> app, BOOL* stop); |
| + |
| +@protocol NativeAppWhitelistManager<NSObject> |
| + |
| +// Sets a new application list to this object. |
| +// The |tldList| is an array of NSStrings enumerating supported top level |
| +// domains without the "." (i.e. @"com" and not @".com"). |
| +// |storeIDs| is an optional array of App Store IDs to select only |
| +// listed apps from |appList|. If |storeIDs| is nil, all apps from |appList| |
| +// will be used. |
| +- (void)setAppList:(NSArray*)appList |
| + tldList:(NSArray*)tldList |
| + acceptStoreIDs:(NSArray*)storeIDs; |
| + |
| +// Returns a new object with the metadata about the iOS native application that |
| +// can handle |url|. Returns nil otherwise. Caller owns the returned object |
| +// and needs to release it when done. |
| +- (id<NativeAppMetadata>)newNativeAppForURL:(const GURL&)url; |
| + |
| +// Returns an autoreleased NSArray of NativeAppMetadata objects which |
|
rohitrao (ping after 24h)
2016/11/08 12:39:18
Typo: which -> for which.
sczs1
2016/11/09 01:14:52
"which" is already being used
|
| +// |condition| block returns YES. |
| +- (NSArray*)filteredAppsUsingBlock:(NativeAppFilter)condition; |
| + |
| +// Returns a scheme opening the app. Returns nil if no scheme is found. |
| +- (NSURL*)schemeForAppId:(NSString*)appId; |
| + |
| +@end |
| + |
| +#endif // IOS_INTERNAL_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_WHITELIST_MANAGER_H_ |
|
rohitrao (ping after 24h)
2016/11/08 12:39:18
Update header guard.
sczs1
2016/11/09 01:14:52
Done.
|