| OLD | NEW |
| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Sets |currentBVC| as the root view controller for the window. | 383 // Sets |currentBVC| as the root view controller for the window. |
| 384 - (void)displayCurrentBVC; | 384 - (void)displayCurrentBVC; |
| 385 // Shows the settings UI. | 385 // Shows the settings UI. |
| 386 - (void)showSettings; | 386 - (void)showSettings; |
| 387 // Shows the accounts settings UI. | 387 // Shows the accounts settings UI. |
| 388 - (void)showAccountsSettings; | 388 - (void)showAccountsSettings; |
| 389 // Shows the Sync settings UI. | 389 // Shows the Sync settings UI. |
| 390 - (void)showSyncSettings; | 390 - (void)showSyncSettings; |
| 391 // Shows the Save Passwords settings. | 391 // Shows the Save Passwords settings. |
| 392 - (void)showSavePasswordsSettings; | 392 - (void)showSavePasswordsSettings; |
| 393 // Shows the Physical Web settings UI. | |
| 394 - (void)showPhysicalWebSettings; | |
| 395 // Invokes the sign in flow with the specified authentication operation and | 393 // Invokes the sign in flow with the specified authentication operation and |
| 396 // invokes |callback| when finished. | 394 // invokes |callback| when finished. |
| 397 - (void)showSignInWithOperation:(AuthenticationOperation)operation | 395 - (void)showSignInWithOperation:(AuthenticationOperation)operation |
| 398 signInAccessPoint:(signin_metrics::AccessPoint)signInAccessPoint | 396 signInAccessPoint:(signin_metrics::AccessPoint)signInAccessPoint |
| 399 callback:(ShowSigninCommandCompletionCallback)callback; | 397 callback:(ShowSigninCommandCompletionCallback)callback; |
| 400 // Wraps a callback with one that first checks if sign-in was completed | 398 // Wraps a callback with one that first checks if sign-in was completed |
| 401 // successfully and the profile wasn't swapped before invoking. | 399 // successfully and the profile wasn't swapped before invoking. |
| 402 - (ShowSigninCommandCompletionCallback)successfulSigninCompletion: | 400 - (ShowSigninCommandCompletionCallback)successfulSigninCompletion: |
| 403 (ProceduralBlock)callback; | 401 (ProceduralBlock)callback; |
| 404 // Shows the Sync encryption passphrase (part of Settings). | 402 // Shows the Sync encryption passphrase (part of Settings). |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 } | 1472 } |
| 1475 case IDC_SHOW_SYNC_SETTINGS: | 1473 case IDC_SHOW_SYNC_SETTINGS: |
| 1476 [self showSyncSettings]; | 1474 [self showSyncSettings]; |
| 1477 break; | 1475 break; |
| 1478 case IDC_SHOW_SYNC_PASSPHRASE_SETTINGS: | 1476 case IDC_SHOW_SYNC_PASSPHRASE_SETTINGS: |
| 1479 [self showSyncEncryptionPassphrase]; | 1477 [self showSyncEncryptionPassphrase]; |
| 1480 break; | 1478 break; |
| 1481 case IDC_SHOW_SAVE_PASSWORDS_SETTINGS: | 1479 case IDC_SHOW_SAVE_PASSWORDS_SETTINGS: |
| 1482 [self showSavePasswordsSettings]; | 1480 [self showSavePasswordsSettings]; |
| 1483 break; | 1481 break; |
| 1484 case IDC_SHOW_PHYSICAL_WEB_SETTINGS: | |
| 1485 [self showPhysicalWebSettings]; | |
| 1486 break; | |
| 1487 case IDC_SHOW_HISTORY: | 1482 case IDC_SHOW_HISTORY: |
| 1488 [self showHistory]; | 1483 [self showHistory]; |
| 1489 break; | 1484 break; |
| 1490 case IDC_TOGGLE_TAB_SWITCHER: | 1485 case IDC_TOGGLE_TAB_SWITCHER: |
| 1491 DCHECK(!_tabSwitcherIsActive); | 1486 DCHECK(!_tabSwitcherIsActive); |
| 1492 if ((!IsIPadIdiom() || experimental_flags::IsTabSwitcherEnabled()) && | 1487 if ((!IsIPadIdiom() || experimental_flags::IsTabSwitcherEnabled()) && |
| 1493 !_isProcessingVoiceSearchCommand) { | 1488 !_isProcessingVoiceSearchCommand) { |
| 1494 [self showTabSwitcher]; | 1489 [self showTabSwitcher]; |
| 1495 _isProcessingTabSwitcherCommand = YES; | 1490 _isProcessingTabSwitcherCommand = YES; |
| 1496 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, | 1491 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 return; | 2058 return; |
| 2064 _settingsNavigationController.reset([SettingsNavigationController | 2059 _settingsNavigationController.reset([SettingsNavigationController |
| 2065 newSavePasswordsController:_mainBrowserState | 2060 newSavePasswordsController:_mainBrowserState |
| 2066 delegate:self]); | 2061 delegate:self]); |
| 2067 [[self topPresentedViewController] | 2062 [[self topPresentedViewController] |
| 2068 presentViewController:_settingsNavigationController | 2063 presentViewController:_settingsNavigationController |
| 2069 animated:YES | 2064 animated:YES |
| 2070 completion:nil]; | 2065 completion:nil]; |
| 2071 } | 2066 } |
| 2072 | 2067 |
| 2073 - (void)showPhysicalWebSettings { | |
| 2074 if (_settingsNavigationController) | |
| 2075 return; | |
| 2076 _settingsNavigationController.reset([SettingsNavigationController | |
| 2077 newPhysicalWebController:_mainBrowserState | |
| 2078 delegate:self]); | |
| 2079 [[self topPresentedViewController] | |
| 2080 presentViewController:_settingsNavigationController | |
| 2081 animated:YES | |
| 2082 completion:nil]; | |
| 2083 } | |
| 2084 | |
| 2085 - (void)showReportAnIssue { | 2068 - (void)showReportAnIssue { |
| 2086 if (_settingsNavigationController) | 2069 if (_settingsNavigationController) |
| 2087 return; | 2070 return; |
| 2088 _settingsNavigationController.reset([SettingsNavigationController | 2071 _settingsNavigationController.reset([SettingsNavigationController |
| 2089 newUserFeedbackController:_mainBrowserState | 2072 newUserFeedbackController:_mainBrowserState |
| 2090 delegate:self | 2073 delegate:self |
| 2091 feedbackDataSource:self]); | 2074 feedbackDataSource:self]); |
| 2092 [[self topPresentedViewController] | 2075 [[self topPresentedViewController] |
| 2093 presentViewController:_settingsNavigationController | 2076 presentViewController:_settingsNavigationController |
| 2094 animated:YES | 2077 animated:YES |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2657 }; | 2640 }; |
| 2658 | 2641 |
| 2659 callbackCounter->IncrementCount(); | 2642 callbackCounter->IncrementCount(); |
| 2660 [self removeBrowsingDataFromBrowserState:_mainBrowserState | 2643 [self removeBrowsingDataFromBrowserState:_mainBrowserState |
| 2661 mask:removeAllMask | 2644 mask:removeAllMask |
| 2662 timePeriod:browsing_data::ALL_TIME | 2645 timePeriod:browsing_data::ALL_TIME |
| 2663 completionHandler:decrementCallbackCounterCount]; | 2646 completionHandler:decrementCallbackCounterCount]; |
| 2664 } | 2647 } |
| 2665 | 2648 |
| 2666 @end | 2649 @end |
| OLD | NEW |