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

Unified Diff: ios/chrome/app/application_delegate/url_opener.h

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 4 years 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: ios/chrome/app/application_delegate/url_opener.h
diff --git a/ios/chrome/app/application_delegate/url_opener.h b/ios/chrome/app/application_delegate/url_opener.h
new file mode 100644
index 0000000000000000000000000000000000000000..2238023bc2192fa2c92d8398ec831eb6029ebc68
--- /dev/null
+++ b/ios/chrome/app/application_delegate/url_opener.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_CHROME_APP_APPLICATION_DELEGATE_URL_OPENER_H_
+#define IOS_CHROME_APP_APPLICATION_DELEGATE_URL_OPENER_H_
+
+#import <UIKit/UIKit.h>
+
+@class AppState;
+@protocol StartupInformation;
+@protocol TabOpening;
+
+// Handles the URL-opening methods of the ApplicationDelegate. This class has
+// only class methods and should not be instantiated.
+@interface URLOpener : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Handles open URL. The registered URL Schemes are defined in project
+// variables ${CHROMIUM_URL_SCHEME_x}.
+// The url can either be empty, in which case the app is simply opened or
+// can contain an URL that will be opened in a new tab.
+// Returns YES if the url can be opened, NO otherwise.
++ (BOOL)openURL:(NSURL*)url
+ applicationActive:(BOOL)applicationActive
+ options:(NSDictionary<NSString*, id>*)options
+ tabOpener:(id<TabOpening>)tabOpener
+ startupInformation:(id<StartupInformation>)startupInformation;
+
+// Handles launch options: converts them to open URL options and opens them.
++ (void)handleLaunchOptions:(NSDictionary*)launchOptions
+ applicationActive:(BOOL)applicationActive
+ tabOpener:(id<TabOpening>)tabOpener
+ startupInformation:(id<StartupInformation>)startupInformation
+ appState:(AppState*)appState;
+@end
+
+#endif // IOS_CHROME_APP_APPLICATION_DELEGATE_URL_OPENER_H_
« no previous file with comments | « ios/chrome/app/application_delegate/tab_switching.h ('k') | ios/chrome/app/application_delegate/url_opener.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698