[ios] Refactor HistoryPopupBox for use with ios clean.

Renames the TabHistoryCoordinator so there's no name collision or confusion
with clean/ coordinators.

Adds a new presentation requirement that provides the view that will present
the History popup menu.

Bug: 683793
Change-Id: Ie473bbc579884347294e4e9a99398ef26ebd31cd
Reviewed-on: https://chromium-review.googlesource.com/614880
Commit-Queue: Sergio Collazos <[email protected]>
Reviewed-by: Rohit Rao (OOO until 8-30) <[email protected]>
Cr-Commit-Position: refs/heads/master@{#496097}
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 5e07831..5274c9d 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -126,7 +126,7 @@
 #import "ios/chrome/browser/ui/first_run/welcome_to_chrome_view_controller.h"
 #import "ios/chrome/browser/ui/fullscreen_controller.h"
 #import "ios/chrome/browser/ui/history_popup/requirements/tab_history_presentation.h"
-#import "ios/chrome/browser/ui/history_popup/tab_history_coordinator.h"
+#import "ios/chrome/browser/ui/history_popup/tab_history_legacy_coordinator.h"
 #import "ios/chrome/browser/ui/key_commands_provider.h"
 #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h"
 #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.h"
@@ -528,7 +528,7 @@
   QRScannerLegacyCoordinator* _qrScannerCoordinator;
 
   // Coordinator for Tab History Popup.
-  TabHistoryCoordinator* _tabHistoryCoordinator;
+  LegacyTabHistoryCoordinator* _tabHistoryCoordinator;
 }
 
 // The browser's side swipe controller.  Lazily instantiated on the first call.
@@ -1854,7 +1854,7 @@
   _qrScannerCoordinator.presentationProvider = self;
 
   _tabHistoryCoordinator =
-      [[TabHistoryCoordinator alloc] initWithBaseViewController:self];
+      [[LegacyTabHistoryCoordinator alloc] initWithBaseViewController:self];
   _tabHistoryCoordinator.dispatcher = _dispatcher;
   _tabHistoryCoordinator.positionProvider = _toolbarController;
   _tabHistoryCoordinator.tabModel = _model;
@@ -5144,6 +5144,10 @@
 
 #pragma mark - TabHistoryPresenter
 
+- (UIView*)viewForTabHistoryPresentation {
+  return self.view;
+}
+
 - (void)prepareForTabHistoryPresentation {
   DCHECK(self.visible || self.dismissingModal);
   [[self.tabModel currentTab].webController dismissKeyboard];