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

Unified Diff: ios/clean/chrome/browser/ui/tools/tools_coordinator.mm

Issue 2785213003: [ios] Use dispatcher for ToolsMenu commands. (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm b/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
index d6196e4599d911ba23d8b358b23cc68911b6e61f..b76dd59426fef7c91689ab058934cc7ac9521ac2 100644
--- a/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
@@ -9,6 +9,7 @@
#import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h"
#import "ios/clean/chrome/browser/ui/tools/tools_mediator.h"
#import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h"
+#import "ios/shared/chrome/browser/ui/browser_list/browser.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -20,7 +21,6 @@
@end
@implementation ToolsCoordinator
-@synthesize toolbarCommandHandler = _toolbarCommandHandler;
@synthesize menuViewController = _menuViewController;
@synthesize mediator = _mediator;
@@ -30,6 +30,8 @@
self.menuViewController = [[MenuViewController alloc] init];
self.menuViewController.modalPresentationStyle = UIModalPresentationCustom;
self.menuViewController.transitioningDelegate = self;
+ self.menuViewController.dispatcher =
+ static_cast<id>(self.browser->dispatcher());
_mediator = [[ToolsMediator alloc] initWithConsumer:self.menuViewController];
[self.context.baseViewController presentViewController:self.menuViewController
@@ -73,7 +75,7 @@ presentationControllerForPresentedViewController:(UIViewController*)presented
[[MenuPresentationController alloc]
initWithPresentedViewController:presented
presentingViewController:presenting];
- menuPresentation.toolbarCommandHandler = self.toolbarCommandHandler;
+ menuPresentation.dispatcher = static_cast<id>(self.browser->dispatcher());
return menuPresentation;
}
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/tools_coordinator.h ('k') | ios/showcase/toolbar/sc_toolbar_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698