| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/ui/settings/settings_navigation_controller.h" | 5 #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" |
| 6 | 6 |
| 7 #include "base/ios/ios_util.h" | 7 #include "base/ios/ios_util.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "components/strings/grit/components_strings.h" | 9 #include "components/strings/grit/components_strings.h" |
| 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 109 } |
| 110 | 110 |
| 111 @synthesize shouldCommitSyncChangesOnDismissal = | 111 @synthesize shouldCommitSyncChangesOnDismissal = |
| 112 shouldCommitSyncChangesOnDismissal_; | 112 shouldCommitSyncChangesOnDismissal_; |
| 113 | 113 |
| 114 #pragma mark - SettingsNavigationController methods. | 114 #pragma mark - SettingsNavigationController methods. |
| 115 | 115 |
| 116 // clang-format off | 116 // clang-format off |
| 117 + (SettingsNavigationController*)newSettingsMainControllerWithMainBrowserState: | 117 + (SettingsNavigationController*)newSettingsMainControllerWithMainBrowserState: |
| 118 (ios::ChromeBrowserState*)browserState | 118 (ios::ChromeBrowserState*)browserState |
| 119 currentBrowserState: | |
| 120 (ios::ChromeBrowserState*)currentBrowserState | |
| 121 delegate: | 119 delegate: |
| 122 (id<SettingsNavigationControllerDelegate>)delegate { | 120 (id<SettingsNavigationControllerDelegate>)delegate { |
| 123 // clang-format on | 121 // clang-format on |
| 124 UIViewController* controller = [[SettingsCollectionViewController alloc] | 122 UIViewController* controller = [[SettingsCollectionViewController alloc] |
| 125 initWithBrowserState:browserState | 123 initWithBrowserState:browserState]; |
| 126 currentBrowserState:currentBrowserState]; | |
| 127 SettingsNavigationController* nc = [[SettingsNavigationController alloc] | 124 SettingsNavigationController* nc = [[SettingsNavigationController alloc] |
| 128 initWithRootViewController:controller | 125 initWithRootViewController:controller |
| 129 browserState:browserState | 126 browserState:browserState |
| 130 delegate:delegate]; | 127 delegate:delegate]; |
| 131 [controller navigationItem].rightBarButtonItem = [nc doneButton]; | 128 [controller navigationItem].rightBarButtonItem = [nc doneButton]; |
| 132 return nc; | 129 return nc; |
| 133 } | 130 } |
| 134 | 131 |
| 135 + (SettingsNavigationController*) | 132 + (SettingsNavigationController*) |
| 136 newAccountsController:(ios::ChromeBrowserState*)browserState | 133 newAccountsController:(ios::ChromeBrowserState*)browserState |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 return [NSValue valueWithNonretainedObject:controller]; | 670 return [NSValue valueWithNonretainedObject:controller]; |
| 674 } | 671 } |
| 675 | 672 |
| 676 #pragma mark - UIResponder | 673 #pragma mark - UIResponder |
| 677 | 674 |
| 678 - (BOOL)canBecomeFirstResponder { | 675 - (BOOL)canBecomeFirstResponder { |
| 679 return YES; | 676 return YES; |
| 680 } | 677 } |
| 681 | 678 |
| 682 @end | 679 @end |
| OLD | NEW |