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

Side by Side Diff: ios/chrome/app/main_controller.mm

Issue 2899213002: Removed NativeAppsCollectionViewController and related code. (Closed)
Patch Set: rebase Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/app/main_controller.h" 5 #import "ios/chrome/app/main_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #import <CoreSpotlight/CoreSpotlight.h> 10 #import <CoreSpotlight/CoreSpotlight.h>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 #import "ios/chrome/browser/ui/tabs/tab_strip_controller+tab_switcher_animation. h" 121 #import "ios/chrome/browser/ui/tabs/tab_strip_controller+tab_switcher_animation. h"
122 #include "ios/chrome/browser/ui/ui_util.h" 122 #include "ios/chrome/browser/ui/ui_util.h"
123 #import "ios/chrome/browser/ui/uikit_ui_util.h" 123 #import "ios/chrome/browser/ui/uikit_ui_util.h"
124 #import "ios/chrome/browser/ui/util/top_view_controller.h" 124 #import "ios/chrome/browser/ui/util/top_view_controller.h"
125 #import "ios/chrome/browser/ui/webui/chrome_web_ui_ios_controller_factory.h" 125 #import "ios/chrome/browser/ui/webui/chrome_web_ui_ios_controller_factory.h"
126 #include "ios/chrome/browser/xcallback_parameters.h" 126 #include "ios/chrome/browser/xcallback_parameters.h"
127 #include "ios/net/cookies/cookie_store_ios.h" 127 #include "ios/net/cookies/cookie_store_ios.h"
128 #import "ios/net/crn_http_protocol_handler.h" 128 #import "ios/net/crn_http_protocol_handler.h"
129 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 129 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
130 #include "ios/public/provider/chrome/browser/distribution/app_distribution_provi der.h" 130 #include "ios/public/provider/chrome/browser/distribution/app_distribution_provi der.h"
131 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white list_manager.h" 131 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white list_manager.h"
lpromero 2017/06/22 11:44:40 Should this go?
pkl (ping after 24h if needed) 2017/06/22 12:18:19 Not yet.
132 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" 132 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
133 #import "ios/public/provider/chrome/browser/user_feedback/user_feedback_provider .h" 133 #import "ios/public/provider/chrome/browser/user_feedback/user_feedback_provider .h"
134 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h" 134 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h"
135 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MDCTypographyAd ditions/MDFRobotoFontLoader+MDCTypographyAdditions.h" 135 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MDCTypographyAd ditions/MDFRobotoFontLoader+MDCTypographyAdditions.h"
136 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF ontLoader.h" 136 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF ontLoader.h"
137 #include "ios/web/net/request_tracker_factory_impl.h" 137 #include "ios/web/net/request_tracker_factory_impl.h"
138 #include "ios/web/net/request_tracker_impl.h" 138 #include "ios/web/net/request_tracker_impl.h"
139 #include "ios/web/net/web_http_protocol_handler_delegate.h" 139 #include "ios/web/net/web_http_protocol_handler_delegate.h"
140 #import "ios/web/public/navigation_manager.h" 140 #import "ios/web/public/navigation_manager.h"
141 #include "ios/web/public/web_capabilities.h" 141 #include "ios/web/public/web_capabilities.h"
(...skipping 26 matching lines...) Expand all
168 NSString* const kStartupAttemptReset = @"StartupAttempReset"; 168 NSString* const kStartupAttemptReset = @"StartupAttempReset";
169 169
170 // Constants for deferring memory debugging tools startup. 170 // Constants for deferring memory debugging tools startup.
171 NSString* const kMemoryDebuggingToolsStartup = @"MemoryDebuggingToolsStartup"; 171 NSString* const kMemoryDebuggingToolsStartup = @"MemoryDebuggingToolsStartup";
172 172
173 // Constants for deferred check if it is necessary to send pings to 173 // Constants for deferred check if it is necessary to send pings to
174 // Chrome distribution related services. 174 // Chrome distribution related services.
175 NSString* const kSendInstallPingIfNecessary = @"SendInstallPingIfNecessary"; 175 NSString* const kSendInstallPingIfNecessary = @"SendInstallPingIfNecessary";
176 176
177 // Constants for deferring check of native iOS apps installed. 177 // Constants for deferring check of native iOS apps installed.
178 NSString* const kCheckNativeApps = @"CheckNativeApps"; 178 NSString* const kCheckNativeApps = @"CheckNativeApps";
lpromero 2017/06/22 11:44:40 Should this go?
pkl (ping after 24h if needed) 2017/06/22 12:18:19 Not yet.
179 179
180 // Constants for deferred deletion of leftover user downloaded files. 180 // Constants for deferred deletion of leftover user downloaded files.
181 NSString* const kDeleteDownloads = @"DeleteDownloads"; 181 NSString* const kDeleteDownloads = @"DeleteDownloads";
182 182
183 // Constants for deferred sending of queued feedback. 183 // Constants for deferred sending of queued feedback.
184 NSString* const kSendQueuedFeedback = @"SendQueuedFeedback"; 184 NSString* const kSendQueuedFeedback = @"SendQueuedFeedback";
185 185
186 // Constants for deferring the deletion of pre-upgrade crash reports. 186 // Constants for deferring the deletion of pre-upgrade crash reports.
187 NSString* const kCleanupCrashReports = @"CleanupCrashReports"; 187 NSString* const kCleanupCrashReports = @"CleanupCrashReports";
188 188
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 identity:(ChromeIdentity*)identity 375 identity:(ChromeIdentity*)identity
376 accessPoint:(signin_metrics::AccessPoint)accessPoint 376 accessPoint:(signin_metrics::AccessPoint)accessPoint
377 promoAction:(signin_metrics::PromoAction)promoAction 377 promoAction:(signin_metrics::PromoAction)promoAction
378 callback:(ShowSigninCommandCompletionCallback)callback; 378 callback:(ShowSigninCommandCompletionCallback)callback;
379 // Wraps a callback with one that first checks if sign-in was completed 379 // Wraps a callback with one that first checks if sign-in was completed
380 // successfully and the profile wasn't swapped before invoking. 380 // successfully and the profile wasn't swapped before invoking.
381 - (ShowSigninCommandCompletionCallback)successfulSigninCompletion: 381 - (ShowSigninCommandCompletionCallback)successfulSigninCompletion:
382 (ProceduralBlock)callback; 382 (ProceduralBlock)callback;
383 // Shows the Sync encryption passphrase (part of Settings). 383 // Shows the Sync encryption passphrase (part of Settings).
384 - (void)showSyncEncryptionPassphrase; 384 - (void)showSyncEncryptionPassphrase;
385 // Shows the Native Apps Settings UI (part of Settings).
386 - (void)showNativeAppsSettings;
387 // Shows the Clear Browsing Data Settings UI (part of Settings). 385 // Shows the Clear Browsing Data Settings UI (part of Settings).
388 - (void)showClearBrowsingDataSettingsController; 386 - (void)showClearBrowsingDataSettingsController;
389 // Shows the Contextual search UI (part of Settings). 387 // Shows the Contextual search UI (part of Settings).
390 - (void)showContextualSearchSettingsController; 388 - (void)showContextualSearchSettingsController;
391 // Shows the tab switcher UI. 389 // Shows the tab switcher UI.
392 - (void)showTabSwitcher; 390 - (void)showTabSwitcher;
393 // Starts a voice search on the current BVC. 391 // Starts a voice search on the current BVC.
394 - (void)startVoiceSearch; 392 - (void)startVoiceSearch;
395 // Dismisses the tab switcher UI without animation into the given model. 393 // Dismisses the tab switcher UI without animation into the given model.
396 - (void)dismissTabSwitcherWithoutAnimationInModel:(TabModel*)tabModel; 394 - (void)dismissTabSwitcherWithoutAnimationInModel:(TabModel*)tabModel;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 - (void)sendQueuedFeedback; 447 - (void)sendQueuedFeedback;
450 // Called whenever an orientation change is received. 448 // Called whenever an orientation change is received.
451 - (void)orientationDidChange:(NSNotification*)notification; 449 - (void)orientationDidChange:(NSNotification*)notification;
452 // Register to receive orientation change notification to update breakpad 450 // Register to receive orientation change notification to update breakpad
453 // report. 451 // report.
454 - (void)registerForOrientationChangeNotifications; 452 - (void)registerForOrientationChangeNotifications;
455 // Asynchronously creates the pref observers. 453 // Asynchronously creates the pref observers.
456 - (void)schedulePrefObserverInitialization; 454 - (void)schedulePrefObserverInitialization;
457 // Asynchronously schedules a check for what other native iOS apps are currently 455 // Asynchronously schedules a check for what other native iOS apps are currently
458 // installed. 456 // installed.
459 - (void)scheduleCheckNativeApps; 457 - (void)scheduleCheckNativeApps;
lpromero 2017/06/22 11:44:40 Should this go?
pkl (ping after 24h if needed) 2017/06/22 12:18:19 This will go into a separate CL. There's some chan
460 // Asynchronously schedules pings to distribution services. 458 // Asynchronously schedules pings to distribution services.
461 - (void)scheduleAppDistributionPings; 459 - (void)scheduleAppDistributionPings;
462 // Asynchronously schedule the init of the memoryDebuggerManager. 460 // Asynchronously schedule the init of the memoryDebuggerManager.
463 - (void)scheduleMemoryDebuggingTools; 461 - (void)scheduleMemoryDebuggingTools;
464 // Asynchronously kick off regular free memory checks. 462 // Asynchronously kick off regular free memory checks.
465 - (void)startFreeMemoryMonitoring; 463 - (void)startFreeMemoryMonitoring;
466 // Asynchronously schedules the notification of the AuthenticationService. 464 // Asynchronously schedules the notification of the AuthenticationService.
467 - (void)scheduleAuthenticationServiceNotification; 465 - (void)scheduleAuthenticationServiceNotification;
468 // Asynchronously schedules the reset of the failed startup attempt counter. 466 // Asynchronously schedules the reset of the failed startup attempt counter.
469 - (void)scheduleStartupAttemptReset; 467 - (void)scheduleStartupAttemptReset;
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 browsing_data::CalculateBeginDeleteTime(timePeriod); 1462 browsing_data::CalculateBeginDeleteTime(timePeriod);
1465 [ChromeWebViewFactory clearExternalCookies:browserState 1463 [ChromeWebViewFactory clearExternalCookies:browserState
1466 fromTime:beginDeleteTime 1464 fromTime:beginDeleteTime
1467 toTime:base::Time::Max()]; 1465 toTime:base::Time::Max()];
1468 } 1466 }
1469 break; 1467 break;
1470 } 1468 }
1471 case IDC_RESET_ALL_WEBVIEWS: 1469 case IDC_RESET_ALL_WEBVIEWS:
1472 [self.currentBVC resetAllWebViews]; 1470 [self.currentBVC resetAllWebViews];
1473 break; 1471 break;
1474 case IDC_SHOW_GOOGLE_APPS_SETTINGS:
1475 [self showNativeAppsSettings];
1476 break;
1477 case IDC_SHOW_CLEAR_BROWSING_DATA_SETTINGS: 1472 case IDC_SHOW_CLEAR_BROWSING_DATA_SETTINGS:
1478 [self showClearBrowsingDataSettingsController]; 1473 [self showClearBrowsingDataSettingsController];
1479 break; 1474 break;
1480 case IDC_SHOW_CONTEXTUAL_SEARCH_SETTINGS: 1475 case IDC_SHOW_CONTEXTUAL_SEARCH_SETTINGS:
1481 [self showContextualSearchSettingsController]; 1476 [self showContextualSearchSettingsController];
1482 break; 1477 break;
1483 case IDC_CLOSE_MODALS: 1478 case IDC_CLOSE_MODALS:
1484 [self dismissModalDialogsWithCompletion:nil]; 1479 [self dismissModalDialogsWithCompletion:nil];
1485 break; 1480 break;
1486 case IDC_SHOW_ADD_ACCOUNT: 1481 case IDC_SHOW_ADD_ACCOUNT:
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 return; 2131 return;
2137 } 2132 }
2138 DCHECK_EQ(self.mainBVC, self.currentBVC); 2133 DCHECK_EQ(self.mainBVC, self.currentBVC);
2139 SigninManager* signinManager = 2134 SigninManager* signinManager =
2140 ios::SigninManagerFactory::GetForBrowserState(browserState); 2135 ios::SigninManagerFactory::GetForBrowserState(browserState);
2141 if (signinManager->IsAuthenticated()) 2136 if (signinManager->IsAuthenticated())
2142 callback(); 2137 callback();
2143 } copy]; 2138 } copy];
2144 } 2139 }
2145 2140
2146 - (void)showNativeAppsSettings {
2147 if (_settingsNavigationController)
2148 return;
2149 _settingsNavigationController =
2150 [SettingsNavigationController newNativeAppsController:_mainBrowserState
2151 delegate:self];
2152 [[self topPresentedViewController]
2153 presentViewController:_settingsNavigationController
2154 animated:YES
2155 completion:nil];
2156 }
2157
2158 - (void)closeSettingsAnimated:(BOOL)animated 2141 - (void)closeSettingsAnimated:(BOOL)animated
2159 completion:(ProceduralBlock)completion { 2142 completion:(ProceduralBlock)completion {
2160 DCHECK(_settingsNavigationController); 2143 DCHECK(_settingsNavigationController);
2161 [_settingsNavigationController settingsWillBeDismissed]; 2144 [_settingsNavigationController settingsWillBeDismissed];
2162 UIViewController* presentingViewController = 2145 UIViewController* presentingViewController =
2163 [_settingsNavigationController presentingViewController]; 2146 [_settingsNavigationController presentingViewController];
2164 DCHECK(presentingViewController); 2147 DCHECK(presentingViewController);
2165 [presentingViewController dismissViewControllerAnimated:animated 2148 [presentingViewController dismissViewControllerAnimated:animated
2166 completion:^{ 2149 completion:^{
2167 if (completion) 2150 if (completion)
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 }; 2563 };
2581 2564
2582 callbackCounter->IncrementCount(); 2565 callbackCounter->IncrementCount();
2583 [self removeBrowsingDataFromBrowserState:_mainBrowserState 2566 [self removeBrowsingDataFromBrowserState:_mainBrowserState
2584 mask:removeAllMask 2567 mask:removeAllMask
2585 timePeriod:browsing_data::TimePeriod::ALL_TIME 2568 timePeriod:browsing_data::TimePeriod::ALL_TIME
2586 completionHandler:decrementCallbackCounterCount]; 2569 completionHandler:decrementCallbackCounterCount];
2587 } 2570 }
2588 2571
2589 @end 2572 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/commands/ios_command_ids.h » ('j') | ios/chrome/browser/ui/settings/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698