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

Unified Diff: ios/chrome/app/chrome_app_startup_parameters.mm

Issue 2807583002: Add app startup parameters to start the app in qr and incognito search. (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | ios/chrome/common/app_group/app_group_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/chrome_app_startup_parameters.mm
diff --git a/ios/chrome/app/chrome_app_startup_parameters.mm b/ios/chrome/app/chrome_app_startup_parameters.mm
index 74054b0267f49665353515c8c2e68f3c4772de89..bc1a9f8307586ff86c58b6c8a9e00b5c9df94803 100644
--- a/ios/chrome/app/chrome_app_startup_parameters.mm
+++ b/ios/chrome/app/chrome_app_startup_parameters.mm
@@ -286,6 +286,33 @@ enum MobileSessionStartAction {
completeURL:url];
}
+ if ([command
+ isEqualToString:base::SysUTF8ToNSString(
+ app_group::kChromeAppGroupQRScannerCommand)]) {
+ ChromeAppStartupParameters* params = [[ChromeAppStartupParameters alloc]
+ initWithExternalURL:GURL(kChromeUINewTabURL)
+ xCallbackParameters:nil
+ declaredSourceApp:appId
+ secureSourceApp:secureSourceApp
+ completeURL:url];
+ [params setLaunchQRScanner:YES];
+ return params;
+ }
+
+ if ([command isEqualToString:
+ base::SysUTF8ToNSString(
+ app_group::kChromeAppGroupIncognitoSearchCommand)]) {
+ ChromeAppStartupParameters* params = [[ChromeAppStartupParameters alloc]
+ initWithExternalURL:GURL(kChromeUINewTabURL)
+ xCallbackParameters:nil
+ declaredSourceApp:appId
+ secureSourceApp:secureSourceApp
+ completeURL:url];
+ [params setLaunchInIncognito:YES];
+ [params setLaunchFocusOmnibox:YES];
+ return params;
+ }
+
return nil;
}
« no previous file with comments | « no previous file | ios/chrome/common/app_group/app_group_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698