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

Side by Side Diff: ios/clean/chrome/browser/ui/settings/settings_coordinator.mm

Issue 2948463002: [iOS Clean] Removed old overlay implementation.
Patch Set: rebase & Mark's comments Created 3 years, 5 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 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 #import "ios/clean/chrome/browser/ui/settings/settings_coordinator.h" 5 #import "ios/clean/chrome/browser/ui/settings/settings_coordinator.h"
6 6
7 #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" 7 #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h"
8 #import "ios/clean/chrome/browser/ui/commands/settings_commands.h" 8 #import "ios/clean/chrome/browser/ui/commands/settings_commands.h"
9 #import "ios/clean/chrome/browser/ui/overlay_service/browser_coordinator+overlay _support.h"
9 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" 10 #import "ios/shared/chrome/browser/ui/browser_list/browser.h"
10 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h" 11 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h"
11 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal. h" 12 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal. h"
12 13
13 #if !defined(__has_feature) || !__has_feature(objc_arc) 14 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support." 15 #error "This file requires ARC support."
15 #endif 16 #endif
16 17
17 @interface SettingsCoordinator ()<SettingsNavigationControllerDelegate> 18 @interface SettingsCoordinator ()<SettingsNavigationControllerDelegate> {
19 // Backing object for property of same name (in OverlaySupport category).
20 OverlayQueue* _overlayQueue;
21 }
18 @property(nonatomic, strong) SettingsNavigationController* viewController; 22 @property(nonatomic, strong) SettingsNavigationController* viewController;
19 @end 23 @end
20 24
21 @implementation SettingsCoordinator 25 @implementation SettingsCoordinator
22 @synthesize viewController = _viewController; 26 @synthesize viewController = _viewController;
23 27
24 #pragma mark - BrowserCoordinator 28 #pragma mark - BrowserCoordinator
25 29
26 - (void)start { 30 - (void)start {
27 self.viewController = [SettingsNavigationController 31 self.viewController = [SettingsNavigationController
28 newSettingsMainControllerWithMainBrowserState:self.browser 32 newSettingsMainControllerWithMainBrowserState:self.browser
29 ->browser_state() 33 ->browser_state()
30 delegate:self]; 34 delegate:self];
31 [super start]; 35 [super start];
32 } 36 }
33 37
38 - (void)stop {
39 [super stop];
40 [self overlayWasStopped];
41 }
42
34 #pragma mark - SettingsNavigationControllerDelegate 43 #pragma mark - SettingsNavigationControllerDelegate
35 44
36 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command { 45 - (void)closeSettingsAndOpenUrl:(OpenUrlCommand*)command {
37 // Placeholder implementation to conform to the delegate protocol; 46 // Placeholder implementation to conform to the delegate protocol;
38 // for now this just closes the settings without opening a URL. 47 // for now this just closes the settings without opening a URL.
39 [self closeSettings]; 48 [self closeSettings];
40 } 49 }
41 50
42 - (void)closeSettingsAndOpenNewIncognitoTab { 51 - (void)closeSettingsAndOpenNewIncognitoTab {
43 // Placeholder implementation to conform to the delegate protocol; 52 // Placeholder implementation to conform to the delegate protocol;
44 // for now this just closes the settings without opening a new tab. 53 // for now this just closes the settings without opening a new tab.
45 [self closeSettings]; 54 [self closeSettings];
46 } 55 }
47 56
48 - (void)closeSettings { 57 - (void)closeSettings {
49 [static_cast<id>(self.browser->dispatcher()) closeSettings]; 58 [static_cast<id>(self.browser->dispatcher()) closeSettings];
50 } 59 }
51 60
52 @end 61 @end
62
63 @implementation SettingsCoordinator (OverlaySupport)
64
65 - (BOOL)supportsOverlaying {
66 return YES;
67 }
68
69 - (void)setOverlayQueue:(OverlayQueue*)overlayQueue {
70 _overlayQueue = overlayQueue;
71 }
72
73 - (OverlayQueue*)overlayQueue {
74 return _overlayQueue;
75 }
76
77 @end
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/settings/BUILD.gn ('k') | ios/clean/chrome/browser/ui/tab/tab_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698