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

Side by Side 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 unified diff | Download patch
OLDNEW
(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_USER_ACTIVITY_HANDLER_H_
6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_USER_ACTIVITY_HANDLER_H_
7
8 #import <UIKit/UIKit.h>
9
10 @protocol BrowserViewInformation;
11 @protocol StartupInformation;
12 @protocol TabOpening;
13
14 // TODO(crbug.com/619598): When the refactoring is over, check if it can be
15 // merged with StartupInformation.
16 // Handles all events based on user activity, as defined in
17 // UIApplicationDelegate.
18 @interface UserActivityHandler : NSObject
19
20 // If the userActivity is a Handoff or an opening from Spotlight, opens a new
21 // tab or setup startupParameters to open it later.
22 // Returns wether it could continue userActivity.
23 + (BOOL)continueUserActivity:(NSUserActivity*)userActivity
24 applicationIsActive:(BOOL)applicationIsActive
25 tabOpener:(id<TabOpening>)tabOpener
26 startupInformation:(id<StartupInformation>)startupInformation;
27
28 // Handles the 3D touch application static items. If the First Run UI is active,
29 // |completionHandler| will be called with NO.
30 + (void)performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
31 completionHandler:(void (^)(BOOL succeeded))completionHandler
32 tabOpener:(id<TabOpening>)tabOpener
33 startupInformation:(id<StartupInformation>)startupInformation
34 browserViewInformation:
35 (id<BrowserViewInformation>)browserViewInformation;
36
37 // Returns YES if Chrome is passing a Handoff to itself or if it is an opening
38 // from Spotlight.
39 + (BOOL)willContinueUserActivityWithType:(NSString*)userActivityType;
40
41 // Opens a new Tab or routes to correct Tab.
42 + (void)handleStartupParametersWithTabOpener:(id<TabOpening>)tabOpener
43 startupInformation:
44 (id<StartupInformation>)startupInformation
45 browserViewInformation:
46 (id<BrowserViewInformation>)browserViewInformation;
47
48 @end
49
50 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_USER_ACTIVITY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698