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 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_coordinator.h" | 5 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_coordinator.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/tools_menu/tools_menu_configuration.h" | |
sczs
2017/04/12 00:59:26
Realized I need to update the BUILD.gn file, but i
marq (ping after 24h)
2017/04/12 11:17:07
Currently the rules are:
/clean can import from /
sczs
2017/04/12 15:06:07
Understood, will start working on moving that file
| |
7 #import "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" | 8 #import "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" |
8 #import "ios/clean/chrome/browser/ui/omnibox/location_bar_coordinator.h" | 9 #import "ios/clean/chrome/browser/ui/omnibox/location_bar_coordinator.h" |
9 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.h" | 10 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.h" |
10 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.h" | 11 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.h" |
11 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h" | 12 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h" |
12 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" | 13 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" |
13 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h" | 14 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h" |
14 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal. h" | 15 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal. h" |
15 #import "ios/web/public/navigation_manager.h" | 16 #import "ios/web/public/navigation_manager.h" |
16 #include "ios/web/public/web_state/web_state.h" | 17 #include "ios/web/public/web_state/web_state.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 completion:nil]; | 95 completion:nil]; |
95 } | 96 } |
96 } | 97 } |
97 | 98 |
98 #pragma mark - ToolsMenuCommands Implementation | 99 #pragma mark - ToolsMenuCommands Implementation |
99 | 100 |
100 - (void)showToolsMenu { | 101 - (void)showToolsMenu { |
101 ToolsCoordinator* toolsCoordinator = [[ToolsCoordinator alloc] init]; | 102 ToolsCoordinator* toolsCoordinator = [[ToolsCoordinator alloc] init]; |
102 [self addChildCoordinator:toolsCoordinator]; | 103 [self addChildCoordinator:toolsCoordinator]; |
103 [toolsCoordinator start]; | 104 [toolsCoordinator start]; |
105 ToolsMenuConfiguration* menuConfiguration = | |
106 [[ToolsMenuConfiguration alloc] initWithDisplayView:nil]; | |
sczs
2017/04/12 00:59:26
Currently [[ToolsMenuConfiguration alloc] init] is
| |
107 menuConfiguration.inTabSwitcher = NO; | |
108 toolsCoordinator.toolsMenuConfiguration = menuConfiguration; | |
sczs
2017/04/12 00:59:26
This is my main question, should the Coordinator i
marq (ping after 24h)
2017/04/12 11:17:07
Conceptually ToolsMenuConfiguration is model code,
sczs
2017/04/12 15:06:07
The problem is that ToolsMenuConfiguration needs t
marq (ping after 24h)
2017/04/14 10:01:51
Ah, OK; I missed that. Then, yes the coordinator t
sczs
2017/04/14 22:21:07
Ack. Will merge this as an initial POC and keep it
| |
104 self.toolsMenuCoordinator = toolsCoordinator; | 109 self.toolsMenuCoordinator = toolsCoordinator; |
105 } | 110 } |
106 | 111 |
107 - (void)closeToolsMenu { | 112 - (void)closeToolsMenu { |
108 [self.toolsMenuCoordinator stop]; | 113 [self.toolsMenuCoordinator stop]; |
109 [self removeChildCoordinator:self.toolsMenuCoordinator]; | 114 [self removeChildCoordinator:self.toolsMenuCoordinator]; |
110 } | 115 } |
111 | 116 |
112 // PLACEHOLDER: These will move to an object that handles navigation. | 117 // PLACEHOLDER: These will move to an object that handles navigation. |
113 #pragma mark - NavigationCommands | 118 #pragma mark - NavigationCommands |
(...skipping 13 matching lines...) Expand all Loading... | |
127 - (void)stopLoadingPage { | 132 - (void)stopLoadingPage { |
128 self.webState->Stop(); | 133 self.webState->Stop(); |
129 } | 134 } |
130 | 135 |
131 - (void)reloadPage { | 136 - (void)reloadPage { |
132 self.webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, | 137 self.webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, |
133 false /*check_for_repost*/); | 138 false /*check_for_repost*/); |
134 } | 139 } |
135 | 140 |
136 @end | 141 @end |
OLD | NEW |