| 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/toolbar/toolbar_coordinator.h" | 9 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_coordinator.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 - (void)webStateDidLoadPage:(web::WebState*)webState { | 42 - (void)webStateDidLoadPage:(web::WebState*)webState { |
| 43 const GURL& pageURL = webState->GetVisibleURL(); | 43 const GURL& pageURL = webState->GetVisibleURL(); |
| 44 [self.viewController | 44 [self.viewController |
| 45 setCurrentPageText:base::SysUTF8ToNSString(pageURL.spec())]; | 45 setCurrentPageText:base::SysUTF8ToNSString(pageURL.spec())]; |
| 46 } | 46 } |
| 47 | 47 |
| 48 #pragma mark - ToolbarCommands | 48 #pragma mark - ToolbarCommands |
| 49 | 49 |
| 50 - (void)showToolsMenu { | 50 - (void)showToolsMenu { |
| 51 ToolsCoordinator* toolsCoordinator = [[ToolsCoordinator alloc] init]; | 51 ToolsCoordinator* toolsCoordinator = [[ToolsCoordinator alloc] init]; |
| 52 toolsCoordinator.toolbarCommandHandler = self; |
| 52 [self addChildCoordinator:toolsCoordinator]; | 53 [self addChildCoordinator:toolsCoordinator]; |
| 53 [toolsCoordinator start]; | 54 [toolsCoordinator start]; |
| 54 self.toolsMenuCoordinator = toolsCoordinator; | 55 self.toolsMenuCoordinator = toolsCoordinator; |
| 55 } | 56 } |
| 56 | 57 |
| 57 - (void)closeToolsMenu { | 58 - (void)closeToolsMenu { |
| 58 [self.toolsMenuCoordinator stop]; | 59 [self.toolsMenuCoordinator stop]; |
| 59 [self removeChildCoordinator:self.toolsMenuCoordinator]; | 60 [self removeChildCoordinator:self.toolsMenuCoordinator]; |
| 60 } | 61 } |
| 61 | 62 |
| 62 @end | 63 @end |
| OLD | NEW |