OLD | NEW |
(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_APP_APPLICATION_DELEGATE_URL_OPENER_H_ |
| 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_URL_OPENER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 @class AppState; |
| 11 @protocol StartupInformation; |
| 12 @protocol TabOpening; |
| 13 |
| 14 // Handles the URL-opening methods of the ApplicationDelegate. This class has |
| 15 // only class methods and should not be instantiated. |
| 16 @interface URLOpener : NSObject |
| 17 |
| 18 - (instancetype)init NS_UNAVAILABLE; |
| 19 |
| 20 // Handles open URL. The registered URL Schemes are defined in project |
| 21 // variables ${CHROMIUM_URL_SCHEME_x}. |
| 22 // The url can either be empty, in which case the app is simply opened or |
| 23 // can contain an URL that will be opened in a new tab. |
| 24 // Returns YES if the url can be opened, NO otherwise. |
| 25 + (BOOL)openURL:(NSURL*)url |
| 26 applicationActive:(BOOL)applicationActive |
| 27 options:(NSDictionary<NSString*, id>*)options |
| 28 tabOpener:(id<TabOpening>)tabOpener |
| 29 startupInformation:(id<StartupInformation>)startupInformation; |
| 30 |
| 31 // Handles launch options: converts them to open URL options and opens them. |
| 32 + (void)handleLaunchOptions:(NSDictionary*)launchOptions |
| 33 applicationActive:(BOOL)applicationActive |
| 34 tabOpener:(id<TabOpening>)tabOpener |
| 35 startupInformation:(id<StartupInformation>)startupInformation |
| 36 appState:(AppState*)appState; |
| 37 @end |
| 38 |
| 39 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_URL_OPENER_H_ |
OLD | NEW |