| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
| 6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
| 7 // ============================================================================ | 7 // ============================================================================ |
| 8 | 8 |
| 9 #import "ios/clean/chrome/browser/ui/settings/settings_coordinator.h" | 9 #import "ios/clean/chrome/browser/ui/settings/settings_coordinator.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 self.viewController = [SettingsNavigationController | 31 self.viewController = [SettingsNavigationController |
| 32 newSettingsMainControllerWithMainBrowserState:self.browserState | 32 newSettingsMainControllerWithMainBrowserState:self.browserState |
| 33 currentBrowserState:self.browserState | 33 currentBrowserState:self.browserState |
| 34 delegate:self]; | 34 delegate:self]; |
| 35 [self.baseViewController presentViewController:self.viewController | 35 [self.baseViewController presentViewController:self.viewController |
| 36 animated:self.context.animated | 36 animated:self.context.animated |
| 37 completion:nil]; | 37 completion:nil]; |
| 38 } | 38 } |
| 39 | 39 |
| 40 - (void)stop { | 40 - (void)stop { |
| 41 [self.viewController dismissViewControllerAnimated:self.context.animated | 41 [self.viewController.presentingViewController |
| 42 completion:nil]; | 42 dismissViewControllerAnimated:self.context.animated |
| 43 completion:nil]; |
| 43 } | 44 } |
| 44 | 45 |
| 45 #pragma mark - SettingsNavigationControllerDelegate | 46 #pragma mark - SettingsNavigationControllerDelegate |
| 46 | 47 |
| 47 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command { | 48 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command { |
| 48 // Placeholder implementation to conform to the delegate protocol; | 49 // Placeholder implementation to conform to the delegate protocol; |
| 49 // for now this just closes the settings without opening a URL. | 50 // for now this just closes the settings without opening a URL. |
| 50 [self closeSettings]; | 51 [self closeSettings]; |
| 51 } | 52 } |
| 52 | 53 |
| 53 - (void)closeSettingsAndOpenNewIncognitoTab { | 54 - (void)closeSettingsAndOpenNewIncognitoTab { |
| 54 // Placeholder implementation to conform to the delegate protocol; | 55 // Placeholder implementation to conform to the delegate protocol; |
| 55 // for now this just closes the settings without opening a new tab. | 56 // for now this just closes the settings without opening a new tab. |
| 56 [self closeSettings]; | 57 [self closeSettings]; |
| 57 } | 58 } |
| 58 | 59 |
| 59 - (void)closeSettings { | 60 - (void)closeSettings { |
| 60 [self.settingsCommandHandler closeSettings]; | 61 [self.settingsCommandHandler closeSettings]; |
| 61 } | 62 } |
| 62 | 63 |
| 63 @end | 64 @end |
| OLD | NEW |