Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: ios/chrome/app/application_delegate/user_activity_handler.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/user_activity_handler.h
diff --git a/ios/chrome/app/application_delegate/user_activity_handler.h b/ios/chrome/app/application_delegate/user_activity_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..4cd75d38f4c2873bccc32931778e1393dcc0d964
--- /dev/null
+++ b/ios/chrome/app/application_delegate/user_activity_handler.h
@@ -0,0 +1,50 @@
+// 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.
+#import <UIKit/UIKit.h>
+@protocol BrowserViewInformation;
+@protocol StartupInformation;
+@protocol TabOpening;
+// TODO( When the refactoring is over, check if it can be
+// merged with StartupInformation.
+// Handles all events based on user activity, as defined in
+// UIApplicationDelegate.
+@interface UserActivityHandler : NSObject
+// If the userActivity is a Handoff or an opening from Spotlight, opens a new
+// tab or setup startupParameters to open it later.
+// Returns wether it could continue userActivity.
++ (BOOL)continueUserActivity:(NSUserActivity*)userActivity
+ applicationIsActive:(BOOL)applicationIsActive
+ tabOpener:(id<TabOpening>)tabOpener
+ startupInformation:(id<StartupInformation>)startupInformation;
+// Handles the 3D touch application static items. If the First Run UI is active,
+// |completionHandler| will be called with NO.
++ (void)performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
+ completionHandler:(void (^)(BOOL succeeded))completionHandler
+ tabOpener:(id<TabOpening>)tabOpener
+ startupInformation:(id<StartupInformation>)startupInformation
+ browserViewInformation:
+ (id<BrowserViewInformation>)browserViewInformation;
+// Returns YES if Chrome is passing a Handoff to itself or if it is an opening
+// from Spotlight.
++ (BOOL)willContinueUserActivityWithType:(NSString*)userActivityType;
+// Opens a new Tab or routes to correct Tab.
++ (void)handleStartupParametersWithTabOpener:(id<TabOpening>)tabOpener
+ startupInformation:
+ (id<StartupInformation>)startupInformation
+ browserViewInformation:
+ (id<BrowserViewInformation>)browserViewInformation;

Powered by Google App Engine
This is Rietveld 408576698