| 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 - (void)start { | 31 - (void)start { |
| 32 self.viewController = [SettingsNavigationController | 32 self.viewController = [SettingsNavigationController |
| 33 newSettingsMainControllerWithMainBrowserState:self.browser | 33 newSettingsMainControllerWithMainBrowserState:self.browser |
| 34 ->browser_state() | 34 ->browser_state() |
| 35 currentBrowserState:self.browser | 35 currentBrowserState:self.browser |
| 36 ->browser_state() | 36 ->browser_state() |
| 37 delegate:self]; | 37 delegate:self]; |
| 38 [self.context.baseViewController presentViewController:self.viewController | 38 [self.context.baseViewController presentViewController:self.viewController |
| 39 animated:self.context.animated | 39 animated:self.context.animated |
| 40 completion:nil]; | 40 completion:nil]; |
| 41 [super start]; |
| 41 } | 42 } |
| 42 | 43 |
| 43 - (void)stop { | 44 - (void)stop { |
| 45 [super stop]; |
| 44 [self.viewController.presentingViewController | 46 [self.viewController.presentingViewController |
| 45 dismissViewControllerAnimated:self.context.animated | 47 dismissViewControllerAnimated:self.context.animated |
| 46 completion:nil]; | 48 completion:nil]; |
| 47 } | 49 } |
| 48 | 50 |
| 49 #pragma mark - SettingsNavigationControllerDelegate | 51 #pragma mark - SettingsNavigationControllerDelegate |
| 50 | 52 |
| 51 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command { | 53 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command { |
| 52 // Placeholder implementation to conform to the delegate protocol; | 54 // Placeholder implementation to conform to the delegate protocol; |
| 53 // for now this just closes the settings without opening a URL. | 55 // for now this just closes the settings without opening a URL. |
| 54 [self closeSettings]; | 56 [self closeSettings]; |
| 55 } | 57 } |
| 56 | 58 |
| 57 - (void)closeSettingsAndOpenNewIncognitoTab { | 59 - (void)closeSettingsAndOpenNewIncognitoTab { |
| 58 // Placeholder implementation to conform to the delegate protocol; | 60 // Placeholder implementation to conform to the delegate protocol; |
| 59 // for now this just closes the settings without opening a new tab. | 61 // for now this just closes the settings without opening a new tab. |
| 60 [self closeSettings]; | 62 [self closeSettings]; |
| 61 } | 63 } |
| 62 | 64 |
| 63 - (void)closeSettings { | 65 - (void)closeSettings { |
| 64 [self.settingsCommandHandler closeSettings]; | 66 [self.settingsCommandHandler closeSettings]; |
| 65 } | 67 } |
| 66 | 68 |
| 67 @end | 69 @end |
| OLD | NEW |