Create interface for toolbar coordinators

This CL creates a ToolbarCoordinatorAdaptor, allowing other objects to
communicate with both toolbars without having to take into account the
real number of toolbars (one or two).
It also adds the ToolsMenu as a child coordinator of this adaptor.
Having it as a child coordinator of the adaptor allows the coordinator
to have the ToolsMenuCommands to be dispatched. If we have one child
coordinator in each toolbar, the dispatcher wouldn't know to which
coordinator to dispatch the method calls.

Bug: 798418, 800330
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I780eb9a5446824824f8af2cd068115f4714121ca
Reviewed-on: https://chromium-review.googlesource.com/861626
Commit-Queue: Gauthier Ambard <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#528606}
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index cda0e70..68a79d05 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -1935,13 +1935,12 @@
       newToolbarModelIOSWithDelegate:_toolbarModelDelegate.get()]);
 
   if (base::FeatureList::IsEnabled(kAdaptiveToolbar)) {
-    _topToolbarCoordinator = [[PrimaryToolbarCoordinator alloc]
-        initWithToolsMenuConfigurationProvider:self
-                                    dispatcher:self.dispatcher
-                                  browserState:_browserState];
+    _topToolbarCoordinator =
+        [[PrimaryToolbarCoordinator alloc] initWithBrowserState:_browserState];
     _topToolbarCoordinator.delegate = self;
     _topToolbarCoordinator.URLLoader = self;
     _topToolbarCoordinator.webStateList = [_model webStateList];
+    _topToolbarCoordinator.dispatcher = self.dispatcher;
     [_topToolbarCoordinator start];
     _bottomToolbarCoordinator = [[SecondaryToolbarCoordinator alloc]
         initWithBaseViewController:nil